Programming
--
Questions
--
Followers
Top Experts
Run-time error '49' Bad DLL calling convention
I'm programming in Visual Basic 6.0 sp6. I've received a DLL called CRYPTOKI.DLL and some examples written in C or C++ (i don't know because I've not expertise in C). I know that the DLL have a function called C_CLOSESESSION that returns a long value and needs a long value session number as parameter: rv&=C_CLOSESESSION(handle& ). The function is declared as: PUBLIC DECLARE FUNCTION C_CLOSESESSION LIB "cryptoki.dll" (byval handle as long) as long
When I call that function I receive run-time error 49.
¿Is possible that this DLL only works in C?
¿Exist another way to invoke that function or I'm doing something wrong?
¿Is possible convert this DLL to be used in VB (I read something about STDCALL)?
I have a .LIB file also.
Thks in advance
Leonel
When I call that function I receive run-time error 49.
¿Is possible that this DLL only works in C?
¿Exist another way to invoke that function or I'm doing something wrong?
¿Is possible convert this DLL to be used in VB (I read something about STDCALL)?
I have a .LIB file also.
Thks in advance
Leonel
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
ASKER CERTIFIED SOLUTION
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
The fact is that the dll already exist and i've not the source code.
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Programming
--
Questions
--
Followers
Top Experts
Programming includes both the specifics of the language you’re using, like Visual Basic, .NET, Java and others, but also the best practices in user experience and interfaces and the management of projects, version control and development. Other programming topics are related to web and cloud development and system and hardware programming.