Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. dll problem

dll problem

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharpc++help
10 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    manu_2205
    wrote on last edited by
    #1

    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

    P H 2 Replies Last reply
    0
    • M manu_2205

      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

      P Offline
      P Offline
      prasad_som
      wrote on last edited by
      #2

      Have you followed link provided in reply to your last post ?

      Prasad Notifier using ATL | Operator new[],delete[][^]

      M 1 Reply Last reply
      0
      • P prasad_som

        Have you followed link provided in reply to your last post ?

        Prasad Notifier using ATL | Operator new[],delete[][^]

        M Offline
        M Offline
        manu_2205
        wrote on last edited by
        #3

        Yes,I didn't understand completely but i got idea from there.

        manu

        P 1 Reply Last reply
        0
        • M manu_2205

          Yes,I didn't understand completely but i got idea from there.

          manu

          P Offline
          P Offline
          prasad_som
          wrote on last edited by
          #4

          It mentions how to use dll in VC++ application. What problem you are facing then ?

          Prasad Notifier using ATL | Operator new[],delete[][^]

          M 1 Reply Last reply
          0
          • P prasad_som

            It mentions how to use dll in VC++ application. What problem you are facing then ?

            Prasad Notifier using ATL | Operator new[],delete[][^]

            M Offline
            M Offline
            manu_2205
            wrote on last edited by
            #5

            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

            P 1 Reply Last reply
            0
            • M manu_2205

              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

              P Offline
              P Offline
              prasad_som
              wrote on last edited by
              #6

              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[][^]

              M 1 Reply Last reply
              0
              • P prasad_som

                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[][^]

                M Offline
                M Offline
                manu_2205
                wrote on last edited by
                #7

                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

                P 1 Reply Last reply
                0
                • M manu_2205

                  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

                  P Offline
                  P Offline
                  prasad_som
                  wrote on last edited by
                  #8

                  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[][^]

                  M 1 Reply Last reply
                  0
                  • P prasad_som

                    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[][^]

                    M Offline
                    M Offline
                    manu_2205
                    wrote on last edited by
                    #9

                    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

                    1 Reply Last reply
                    0
                    • M manu_2205

                      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

                      H Offline
                      H Offline
                      Hamid Taebi
                      wrote on last edited by
                      #10

                      Do you want to use of functions on the dll in your program ?


                      WhiteSky


                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups