Originally posted by: Joe Oppenheim
I am looking for a way to list the exported functions from a DLL using API calls as I do not have the header files of the relevant DLL's.
Does anybody know how to accomplish this?
Cheers
Joe Oppenheim
Opnel Group
Originally posted by: Callie
Here is the code
in sum.c
__declspec(dllimport)int _cdecl sum(int x, int y);
in sum.dll
DllEXPORT int _cdecl sum(int x, int y);
int _cdecl sum(int x, int y) {
return (x+y);
in sum.def
EXPORTS
when I built the dll, there is always an error message that no object files and libraries specified, and also sum is regarded as external unresolved symbols
Does anyone know what's the problem with the code ?
Thank you very much
Callie
I encountered difficulties in exporting/importing functions while using DLL
}
sum
Originally posted by: sreedhar
how the com applications wilkl be created in vc++.
ReplyOriginally posted by: Srinivas
I am calling Activex Dll method in ASP Page .
It is giving the following Error:
("Class does not support Automation or does not support expected interface")
can you solve the problem
Originally posted by: sekharchowdary
I have implemented a MFC dll(not ActiveX dll) and want to call the methods in VB application.
extern "C" LPCTSTR InitLib(CString strFolder, int iVal);
I have this declaration in VB
dim s as String
When i called the above method continuously for sometimes i am getting memory exception. i got to know that VB String is not equal to MFC LPCTSTR. if so how to trap the returned value into vb String.
If the about method is returning around 5,000 characters how to store it into a VB String?
Regards.
Hello,
I delcared my functions like this in MFC
this returns a CString.
Private Declare Function InitLib Lib "c:\test.dll" (ByVal str as String, i as Integer) As String
s=InitLib("string",1);
s=StrConv(s,vbUnicode,NULL);
MsgBox s
Rajasekhar
Originally posted by: menuka
I am using GetProcAddress to retrieve the address of the exported function in dll. This works fine but when I call the function in dll it does not behave in the manner as expected . That means the dll function should return TRUE but it returns false.
return 1;
with regards,
Hi,
I am facing following problem in dll.
The dll function is
#define MY_MODUL_NAME "pEG DDD"
extern "C" _declspec(dllexport) CheckAbc(const char *name,const char *ver)
{
if(strcmp(MY_MODUL_NAME,MY_MODUL_NAME)
return 0;
}
nOW IT SHOULD ALWAYS RETURN 1 BUT IT DOES NOT DO SO. iT ALWAYS RETURNS ME ZERO . ANY IDEA???ANY SOLUTIONS???
Menuka
Originally posted by: krk
Hi,
Pls tell me how to implement plugin concept in VC++ applicatoin. i.e in core application I have to implement dummy plugin interfaces and when ever dll import to application then I am in positon to use dll intrfaces using core implemenatation
Thanks and Regards,
KRK
Originally posted by: Madhavi
I have developed a win32 dll in VC++ with a set of functions. i want to execute a function from this library using GetProcAddress. GetProcAddres only returns the address of the function in the addressspace.but how can we execute this function with the address. if u have any idea, please send me the code.
http://www.functionx.com/vcnet/libraries/explicitdll.htm The bove URL is not accessible(page not found) Can you please tell me the method kevinsmackdown8?
ReplyCheck out this link, it helped me a lot.... http://www.functionx.com/vcnet/libraries/explicitdll.htm
ReplyOriginally posted by: Juan Miguel Jim�nez
MyDLL.dll VERSION 1.0.0.1
Then, I'm referencing this in a visual basic 6-SP3 project and using this in a module. I does that in MyProject.exe, version 1.0.0.0:
'I creates a Dynamic array in a module
Now in a procedure I does:
Public Sub MyProcedure(...)
'filling array
...
But my problem appears when I develops MyDLL.dll 1.0.0.2;
When I compiles a new MyProject.exe 10.0.0.1 having reference to MyDll.dll 1.0.0.2, the compilation comes OK. But when I sends this new MyProject.exe (with their .CAB containing MyDll 1.0.0.2) to a client having MyProject.exe 1.0.0.0 and MyDll.dll 1.0.0.1 this PC does a double beep and exits whithout any message.
If I comments the lines doing redims I've expossed up and compiles a new version of Myproject.exe 1.0.0.2, all comes ok (the reinstallation of MyDll.dll comes ok, etc.).
Someone have noticed this kind of troubles with Dynamic Dynamic arrays of ActiveX DLL-implemented objects?
Thank you in advance!
Juan Miguel Jim�nez Salvador
I have developped an ActiveX DLL that exposes a sort of procedures, types, etc:
public type MyDLL.MyType
Public lstObjects() as MyDll.MyType
...
're-inicialization of array
redim lstObjects(0) as MyDll.MyType
nObjects = nObjects + 1
while
redim preserve lstObjects(nObjects) as MyDll.Mytype
...
nObjects = nObjects + 1
wend
end sub
Until here all comes OK (this does things I want).
I makes Myproject.exe version 1.0.0.1, including code to install and register MyDll.dll 1.0.0.2, extracting this from a CAB file when at PC client there is a wrong version of this DLL (we need do this because we must distribute constantly new DLL versions to a great number of customers).
Barcelona (Spain)
jmjs@ati.es
Originally posted by: Pete
Is it possible for the .dll file to retrieve the name of the program who loaded it?...
Use GetModuleFileName
Reply