how to call vb dll in vc++( iam using MFC) and vc6
-
can u please help any body how to call vb dll in vc++ i MY VB DLL IS mydll.dll #import "c:\mydll.dll" // this is given compilation errors or typedef CString (WINAPI*ifunc)(CString str); INCREMENTFUN pIncrement; HINSTANCE hLib; hLib = LoadLibrary("..\\scdthndl.dll"); pIncrement = (INCREMENTFUN)GetProcAddress((HMODULE)hLib, "StringToCSV"); // here its giving pIncrement = 0x0000000 any one can help me....
-
Member 3653751 wrote:
c:\mydll.dll
Member 3653751 wrote:
scdthndl.dll
Why different names?
Member 3653751 wrote:
pIncrement = (INCREMENTFUN)GetProcAddress((HMODULE)hLib, "StringToCSV"); // here its giving pIncrement = 0x0000000
Afterwards, you should call
GetLastError()
to obtain more info. Did you check what is the exported function name (you may use, for instance, theDepends
tool)? :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]sorry.... by mistake i typed scdthndl.dll...if i give mydll.dll also same problem.... can u please help i want use vb dll in vc++
-
sorry.... by mistake i typed scdthndl.dll...if i give mydll.dll also same problem.... can u please help i want use vb dll in vc++
Did you check the exported function name? Do you read the suggestions (mine and of the other folks?)? :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
can u please help any body how to call vb dll in vc++ i MY VB DLL IS mydll.dll #import "c:\mydll.dll" // this is given compilation errors or typedef CString (WINAPI*ifunc)(CString str); INCREMENTFUN pIncrement; HINSTANCE hLib; hLib = LoadLibrary("..\\scdthndl.dll"); pIncrement = (INCREMENTFUN)GetProcAddress((HMODULE)hLib, "StringToCSV"); // here its giving pIncrement = 0x0000000 any one can help me....
Check whether scdthndl.dll is loaded, means hLib is having value or it is also 0?
Величие не Бога может быть недооценена.
-
hi i have vb activex dll...i want to use vc++...please help me.... HINSTANCE hLib; hLib = LoadLibrary(c:\scdthndl.dll"); pIncrement = (INCREMENTFUN)GetProcAddress((HMODULE)hLib, "StringToCSV"); pIncrement is giving 0x000000..
-
Did you check the exported function name? Do you read the suggestions (mine and of the other folks?)? :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]i checked exported function name....it is correct only... but its giveing NULL....
-
i checked exported function name....it is correct only... but its giveing NULL....
Why didn't you call, as suggested,
GetLastError
?If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Check whether scdthndl.dll is loaded, means hLib is having value or it is also 0?
Величие не Бога может быть недооценена.
hi hlib have value...GetProcAddress() only Null coming please give me any suggestions....
-
hi hlib have value...GetProcAddress() only Null coming please give me any suggestions....
Then surely StringToCSV is not an exported function from that DLL check the depedency of the DLL, check if StringToCSV is shown in Exported functions.
Величие не Бога может быть недооценена.
-
hi i have vb activex dll...i want to use vc++...please help me.... HINSTANCE hLib; hLib = LoadLibrary(c:\scdthndl.dll"); pIncrement = (INCREMENTFUN)GetProcAddress((HMODULE)hLib, "StringToCSV"); pIncrement is giving 0x000000..
As I told you before, verify the function is exported.
Steve