First problem
With a c function definition
//////////////////////////////
#define VERSION "1.0.0"
__declspec(dllexport) const char* __stdcall GetVersion()
{
return VERSION;
}
/////////////////////////////
why a vb6 declaration like
Public Declare Function GetVersion Lib "mylib.dll" () As String
just crash?
Others functions work fine
************************************************************************************
Second problem
This same library if i use it from the VB6 IDE it works perfectly ( except for the above function ) but if i build the exe file it crash, i modified the optimizations in the compiler options and after setting the "No optimizations" option the exe file didnt crash, but now it doesnt load ACTIVEXs files which are not registered with regedit, before with just copying the activex in the same folder as the exe file it had worked fine.
Weirder yet
i do the dll callings inside a class that is inside another class, but if a do the callings from the parent class it works fine, something like this pseudocode
Declare LibDoSomething lib .........................
class class2
{
sub DoSomething ()
call LibDoSomething()
end sub
}
class class1
{
sub Something()
set c2 = new class2
call c2.DoSomething ''''''''''''''' Crash , in exe file not in IDE
call LibDoSomething '''''''''' Not crash in exe file nor in IDE
end sub
}
call Something
somebody has any idea where can be the problem?
Thanks
With a c function definition
//////////////////////////////
#define VERSION "1.0.0"
__declspec(dllexport) const char* __stdcall GetVersion()
{
return VERSION;
}
/////////////////////////////
why a vb6 declaration like
Public Declare Function GetVersion Lib "mylib.dll" () As String
just crash?
Others functions work fine
************************************************************************************
Second problem
This same library if i use it from the VB6 IDE it works perfectly ( except for the above function ) but if i build the exe file it crash, i modified the optimizations in the compiler options and after setting the "No optimizations" option the exe file didnt crash, but now it doesnt load ACTIVEXs files which are not registered with regedit, before with just copying the activex in the same folder as the exe file it had worked fine.
Weirder yet
i do the dll callings inside a class that is inside another class, but if a do the callings from the parent class it works fine, something like this pseudocode
Declare LibDoSomething lib .........................
class class2
{
sub DoSomething ()
call LibDoSomething()
end sub
}
class class1
{
sub Something()
set c2 = new class2
call c2.DoSomething ''''''''''''''' Crash , in exe file not in IDE
call LibDoSomething '''''''''' Not crash in exe file nor in IDE
end sub
}
call Something
somebody has any idea where can be the problem?
Thanks