|
Try giving full path in LoadLibrary.
HMODULE myDll = LoadLibrary("myfile.dll");
to something like
HMODULE myDll = LoadLibrary("C:\\Myproject\\debug\\myfile.dll");
|
|
|
|
|
What the error return code you are getting from LoadLibrary function?
|
|
|
|
|
GetProcAddress(myDll,"function1");
maybe the 2nd parameter is the key.
you could use "dumpbin /exports myfile.dll" to check the exported functions' name.
then,give the right name string.
i think your dll should include .def file
modified on Tuesday, December 29, 2009 3:16 AM
|
|
|
|
|
Le@rner wrote: but control is not going inside if statement...
Which one ? The one after the call to LoadLibrary or the one after the call to GetProcAddress ? If this is the second call, make sure that you have provided a module defintion file (.def file) as explained in the documentation[^]
|
|
|
|
|
hi:
How to generate random file names? It is better provide a simple method. thanks 
|
|
|
|
|
Have you tried GetTempFileName() ?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
UINT GetTempFileName(
LPCTSTR lpPathName, // pointer to directory name for temporary
// file
LPCTSTR lpPrefixString, // pointer to filename prefix
UINT uUnique, // number used to create temporary filename
LPTSTR lpTempFileName
// pointer to buffer that receives the new
// filename
);
I am not a genius, but shed more sweat!
|
|
|
|
|
Filename extension from .tmp to .txt or another? how to do
|
|
|
|
|
Find .tmp and replace it to .txt in the generated filename string 
|
|
|
|
|
May I get filename which like *.txt directly using GetTempFileName() 
|
|
|
|
|
Did you read the docs? It plainly states that a .tmp extension will be used.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi
Because I used multi-inheritance in my application. I can not use MFC default file serialization. I have to implement file saving and reading function myself.
My question is how to save/read a class information to/from file.
If I save a class information with class name and its property into the file. How do I know the character string in the file is a class name or not?
Thanks,
|
|
|
|
|
|
I got an error:
\utility\std_serialize.h(102) : error C2039: 'hash_map' : is not a member of 'std'
Thanks
|
|
|
|
|
Try adding #include <hash_map> in std_serialize.h .
modified on Monday, December 28, 2009 10:44 PM
|
|
|
|
|
«_Superman_» wrote: Try adding #include in std_serialize.h.
Maybe you want to write a space between "<", "Whatever" and ">" if not, there is nothing to include in your answer
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
yes, that helps. The official stance is to check the "Encode HTML tags when pasting" checkbox underneath the edit box.
|
|
|
|
|
I always forget to use the HTML escape tags while typing.
Because of this I had requested a new window appear when typing code.
Hopefully we will see this feature in the near future.
|
|
|
|
|
Just use the "Preview" button before final posting.
|
|
|
|
|
I know, but ignoring HTML Tags... is there no problem with /code, /pre or other tags?
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
This is a consequence of a breaking change introduced since vs2005.
You can either #include <hash_map> or - in case you're not interested in std::hash_map serialization - comment out / remove the definition of the << and >> operators for has_map inside std_serialize.h
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
Dig into the MFC source for the CArchive class and you'll be able to decipher their serialization scheme. It's not too hard, IIRC - there's a WORD flag at the beginning that signifies the start of a document class; next comes a class tag in a DWORD ; if you've made your document class versionable, the version number is also embedded in this DWORD; next comes an char string of the document class name... etc, etc.
I've reverse engineered it in the past so I was able to open/save MFC documents from a WTL app - takes a little spelunking into the source, but it can be done.
L u n a t i c F r i n g e
|
|
|
|
|
I want to open a password protected database in vc 6 program but it do not works following is the code (if db has no password then every thing works fine)
m_pConnDB->Open (_bstr_t ("Provider=Microsoft.Jet.OLEDB.4.0; \
Data Source = Database1.accdb"), \
_bstr_t (""), \
_bstr_t (""), \
adModeUnknown);
I have also tried "Jet OLEDB:Database Password = mypassword" but it dont work
I have also tried same code on MDB file instead of accdb files but still same error.
Thanks in advance ![Rose | [Rose]](https://codeproject.global.ssl.fastly.net/script/Forums/Images/rose.gif)
|
|
|
|
|
Hi,
I have designed a 3 dialog based application. All pages are doing something, every page is having Close button (CDialog::ONOK()).
But at the last page When I closes the application (CDialog::ONOK()), application does not close, it appears to close but still running in hidden mode...I tracked this using Task Manager.
What can be the cause of behaving like this?
|
|
|
|