about dlls in visual C ++ 6 and Visual C++ 2005
-
Dear all I have two programs: 1. the source code of a dll suppose that a.dll 2. the source code of program which uses a.dll suppose b.exe. both of them were written in vc6 IDE, and both are operational now I compile the a.dll in visual C++ 2005. but when I want to use a.dll with b.exe , when I call GetProcAddress to retrieve the address of functions , Null value is returned. I dont know how to overcome this problem. If u have any idea please let me know. I must say that a.dll should be backward compatible , thus it is not possible to change b.exe program. Regards Mahdi
-
Dear all I have two programs: 1. the source code of a dll suppose that a.dll 2. the source code of program which uses a.dll suppose b.exe. both of them were written in vc6 IDE, and both are operational now I compile the a.dll in visual C++ 2005. but when I want to use a.dll with b.exe , when I call GetProcAddress to retrieve the address of functions , Null value is returned. I dont know how to overcome this problem. If u have any idea please let me know. I must say that a.dll should be backward compatible , thus it is not possible to change b.exe program. Regards Mahdi
Gut Mikh Tappe wrote:
when I call GetProcAddress to retrieve the address of functions , Null value is returned
Check the below two things. 1) Debug the application and when the GetProcAddress returns NULL, put
err,hr
in the watch window to find the last error occured. 2)Take the dependecy walker and open the dll. In the export section of the dll, check whether the function is exported or not. -
Gut Mikh Tappe wrote:
when I call GetProcAddress to retrieve the address of functions , Null value is returned
Check the below two things. 1) Debug the application and when the GetProcAddress returns NULL, put
err,hr
in the watch window to find the last error occured. 2)Take the dependecy walker and open the dll. In the export section of the dll, check whether the function is exported or not.thank you mr Nave I found that I didnt export functions of dll. But i dont know what dependency walker is. whould you please let me know about it. I download a tiny software to see the export list of the dll. Regards Mahdi
-
thank you mr Nave I found that I didnt export functions of dll. But i dont know what dependency walker is. whould you please let me know about it. I download a tiny software to see the export list of the dll. Regards Mahdi
Gut Mikh Tappe wrote:
But i dont know what dependency walker is.
-
Gut Mikh Tappe wrote:
But i dont know what dependency walker is.
Thank you mr nave you are my abroad friend. Hope you to be successfull. Regards Mahdi
-
Thank you mr nave you are my abroad friend. Hope you to be successfull. Regards Mahdi
Always keep in mind there's nothing to do with which version of the VC compiler was used to make the dll. Always check for the dependency & exported functions ,that's it.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus Best wishes to Rexx[^]
-
Dear all I have two programs: 1. the source code of a dll suppose that a.dll 2. the source code of program which uses a.dll suppose b.exe. both of them were written in vc6 IDE, and both are operational now I compile the a.dll in visual C++ 2005. but when I want to use a.dll with b.exe , when I call GetProcAddress to retrieve the address of functions , Null value is returned. I dont know how to overcome this problem. If u have any idea please let me know. I must say that a.dll should be backward compatible , thus it is not possible to change b.exe program. Regards Mahdi
In addition to the previous (good) answers, you'll want to look up "name decoration", and "extern "C" {" in the search engine of your choice. Iain.