dll problem
-
Hi experts I have a dll file .First i used it in c# application it works fine. But i want to use it in c++ program .I use "dumpbin" command to see the function provided by dll. but it shows only 9 function (not seen in c#)although in c# i have seen number of function .what is problem. one thing more "dumpbin" command also shows that this is not a class based dll. so tell me the below qurries: 1.What is the procedure to use a dll in c++ program 2.how can i use that functions that is used in c# application. Thanks
manu
-
Hi experts I have a dll file .First i used it in c# application it works fine. But i want to use it in c++ program .I use "dumpbin" command to see the function provided by dll. but it shows only 9 function (not seen in c#)although in c# i have seen number of function .what is problem. one thing more "dumpbin" command also shows that this is not a class based dll. so tell me the below qurries: 1.What is the procedure to use a dll in c++ program 2.how can i use that functions that is used in c# application. Thanks
manu
Have you followed link provided in reply to your last post ?
Prasad Notifier using ATL | Operator new[],delete[][^]
-
Have you followed link provided in reply to your last post ?
Prasad Notifier using ATL | Operator new[],delete[][^]
-
It mentions how to use dll in VC++ application. What problem you are facing then ?
Prasad Notifier using ATL | Operator new[],delete[][^]
-
It mentions how to use dll in VC++ application. What problem you are facing then ?
Prasad Notifier using ATL | Operator new[],delete[][^]
i use explicit linking like this typedef UINT (CALLBACK* LPFNDLLFUNC1)(void); HINSTANCE hDLL; // Handle to DLL LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer hDLL = LoadLibrary("MyFile.DLL"); if (hDLL != NULL) { lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL, "DLLFunc1"); if (!lpfnDllFunc1) { // handle the error FreeLibrary(hDLL); return SOME_ERROR_CODE; } else { // call the function uReturnVal = lpfnDllFunc1(void); } } But using "dumpbin" i saw the function that are never seen by me in c# application.Here (c++)it shows only 9 function that are not useful for me.How can i use function that are used by me in c# application by same dll i am also sending some c# code plz suggest me to use in c++ Redemption.RDOSessionClass Session=new Redemption.RDOSessionClass(); Session.Logon("",0,0,0,0,0); Redemption.RDOStore NewStore=(Redemption.RDOStore)Session.Stores.AddPSTStore(@"c:\temp\PST1.pst",null,"New PST"); Redemption.RDOFolder NewFolder=NewStore.IPMRootFolder.Folders.Add("Parshant",null);
manu
-
i use explicit linking like this typedef UINT (CALLBACK* LPFNDLLFUNC1)(void); HINSTANCE hDLL; // Handle to DLL LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer hDLL = LoadLibrary("MyFile.DLL"); if (hDLL != NULL) { lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL, "DLLFunc1"); if (!lpfnDllFunc1) { // handle the error FreeLibrary(hDLL); return SOME_ERROR_CODE; } else { // call the function uReturnVal = lpfnDllFunc1(void); } } But using "dumpbin" i saw the function that are never seen by me in c# application.Here (c++)it shows only 9 function that are not useful for me.How can i use function that are used by me in c# application by same dll i am also sending some c# code plz suggest me to use in c++ Redemption.RDOSessionClass Session=new Redemption.RDOSessionClass(); Session.Logon("",0,0,0,0,0); Redemption.RDOStore NewStore=(Redemption.RDOStore)Session.Stores.AddPSTStore(@"c:\temp\PST1.pst",null,"New PST"); Redemption.RDOFolder NewFolder=NewStore.IPMRootFolder.Folders.Add("Parshant",null);
manu
manu_2205 wrote:
typedef UINT (CALLBACK* LPFNDLLFUNC1)(void); HINSTANCE hDLL; // Handle to DLL LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer hDLL = LoadLibrary("MyFile.DLL"); if (hDLL != NULL) { lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL, "DLLFunc1"); if (!lpfnDllFunc1) { // handle the error FreeLibrary(hDLL); return SOME_ERROR_CODE; } else { // call the function uReturnVal = lpfnDllFunc1(void); } }
You are right here. Is this code is failing for you ? If yes, where ?
manu_2205 wrote:
Redemption.RDOSessionClass Session=new Redemption.RDOSessionClass(); Session.Logon("",0,0,0,0,0); Redemption.RDOStore NewStore=(Redemption.RDOStore)Session.Stores.AddPSTStore(@"c:\temp\PST1.pst",null,"New PST"); Redemption.RDOFolder NewFolder=NewStore.IPMRootFolder.Folders.Add("Parshant",null);
Looks like use defined classes. What you are trying to do here ?
Prasad Notifier using ATL | Operator new[],delete[][^]
-
manu_2205 wrote:
typedef UINT (CALLBACK* LPFNDLLFUNC1)(void); HINSTANCE hDLL; // Handle to DLL LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer hDLL = LoadLibrary("MyFile.DLL"); if (hDLL != NULL) { lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hDLL, "DLLFunc1"); if (!lpfnDllFunc1) { // handle the error FreeLibrary(hDLL); return SOME_ERROR_CODE; } else { // call the function uReturnVal = lpfnDllFunc1(void); } }
You are right here. Is this code is failing for you ? If yes, where ?
manu_2205 wrote:
Redemption.RDOSessionClass Session=new Redemption.RDOSessionClass(); Session.Logon("",0,0,0,0,0); Redemption.RDOStore NewStore=(Redemption.RDOStore)Session.Stores.AddPSTStore(@"c:\temp\PST1.pst",null,"New PST"); Redemption.RDOFolder NewFolder=NewStore.IPMRootFolder.Folders.Add("Parshant",null);
Looks like use defined classes. What you are trying to do here ?
Prasad Notifier using ATL | Operator new[],delete[][^]
Here i m trying to create a pst by class defined in dll file. for e.g Redemption.RDOSessionClass Session=new Redemption.RDOSessionClass(); Session.Logon("",0,0,0,0,0); here Redemption is namespace and RDOSession is a class. I create a object of that class and call the Logon() method. Next line creating a pst at spacified location. and next to create folder in pst. so plz tell me how can i do this in c++
manu
-
Here i m trying to create a pst by class defined in dll file. for e.g Redemption.RDOSessionClass Session=new Redemption.RDOSessionClass(); Session.Logon("",0,0,0,0,0); here Redemption is namespace and RDOSession is a class. I create a object of that class and call the Logon() method. Next line creating a pst at spacified location. and next to create folder in pst. so plz tell me how can i do this in c++
manu
manu_2205 wrote:
Here i m trying to create a pst by class defined in dll file. for e.g Redemption.RDOSessionClass Session=new Redemption.RDOSessionClass(); Session.Logon("",0,0,0,0,0);
Is this dll is created using C#(class library) ? If yes, not sure, If how/it is possible to use in VC++. You can get some help from C#[^] forum.
Prasad Notifier using ATL | Operator new[],delete[][^]
-
manu_2205 wrote:
Here i m trying to create a pst by class defined in dll file. for e.g Redemption.RDOSessionClass Session=new Redemption.RDOSessionClass(); Session.Logon("",0,0,0,0,0);
Is this dll is created using C#(class library) ? If yes, not sure, If how/it is possible to use in VC++. You can get some help from C#[^] forum.
Prasad Notifier using ATL | Operator new[],delete[][^]
Try to understand me Sir, Actaully my problem is : According to "dumpbin" this dll is not class dll although function dll while in above program i create a object of class. And shows different function from Logon(),RDOAddpst(), What is the reason ,how can i use these function.
manu
-
Hi experts I have a dll file .First i used it in c# application it works fine. But i want to use it in c++ program .I use "dumpbin" command to see the function provided by dll. but it shows only 9 function (not seen in c#)although in c# i have seen number of function .what is problem. one thing more "dumpbin" command also shows that this is not a class based dll. so tell me the below qurries: 1.What is the procedure to use a dll in c++ program 2.how can i use that functions that is used in c# application. Thanks
manu
Do you want to use of functions on the dll in your program ?
WhiteSky