CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Join Date
    Jun 2001
    Location
    Denmark
    Posts
    453

    Question Accessing managed dll from c++

    I need to access a DLL made in C# from C++ (v 6.0).

    I found this article:
    http://support.microsoft.com/kb/828736

    But I run into problems whenever I try to register the DLL. It suggests that I add [ClassInterface(ClassInterfaceType.None)] to my class, which I then did, and it didn't work.

    Does anyone have a code sample with a C# DLL accessed from C++ which works? Preferably a solution with the C# dll and another one with the C++ that accesses it.

    Other suggestions/hints/articles are also welcome.

    Thanks in advance.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,395

    Re: Accessing managed dll from c++

    Quote Originally Posted by Lars_V_J View Post
    But I run into problems whenever I try to register the DLL. It suggests that I add [ClassInterface(ClassInterfaceType.None)] to my class, which I then did, and it didn't work.
    Who suggests?
    What exactly "didn't work"?
    Victor Nijegorodov

  3. #3
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Accessing managed dll from c++

    Don't know where your problem is, but the MS sample builds just fine and works like charm.

    Code:
    E:\Temp\678>make.bat
    
    Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    Microsoft (R) .NET Framework Assembly Registration Utility 4.0.30319.1
    Copyright (C) Microsoft Corporation 1998-2004.  All rights reserved.
    
    Types registered successfully
    Assembly exported to 'E:\Temp\678\ManagedDLL.tlb', and the type library was registered successfully
    Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    client.cpp
    Microsoft (R) Incremental Linker Version 10.00.40219.01
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    /out:client.exe
    client.obj
    Code:
    E:\Temp\678>client.exe
    
    The result is 15
    Attached Files Attached Files
    Best regards,
    Igor

  4. #4
    Join Date
    Jun 2001
    Location
    Denmark
    Posts
    453

    Re: Accessing managed dll from c++

    At the moment, when I try to register the DLL, my command prompt looks like this:
    C:\SSRoot\FaellesIndbetaling\Common\POAHandler\POAHandler>regasm .\bin\Debug\POA
    Handler.dll /tlb:C:\SSRoot\FaellesIndbetaling\Common\POAHandler\POAHandler\poaha
    ndler.tlb /codebase
    Microsoft (R) .NET Framework Assembly Registration Utility 4.0.30319.1
    Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.

    Types registered successfully
    Type library exporter warning processing 'POAHandler.POA_serviceref.POAServiceCl
    ient, POAHandler'. Warning: Type library exporter encountered a type that derive
    s from a generic class and is not marked as [ClassInterface(ClassInterfaceType.N
    one)]. Class interfaces cannot be exposed for such types. Consider marking the t
    ype with [ClassInterface(ClassInterfaceType.None)] and exposing an explicit inte
    rface as the default interface to COM using the ComDefaultInterface attribute.
    Assembly exported to 'C:\SSRoot\FaellesIndbetaling\Common\POAHandler\POAHandler\
    poahandler.tlb', and the type library was registered successfully

    And when I try to import things in my c++ project, it claims that it knows nothing about my class or interface.

    Csharp code:
    Code:
    
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using POAHandler.POA_serviceref;
    using System.Runtime.InteropServices;
    
    /*
     * 
     * 
     * C:\SSRoot\FaellesIndbetaling\Common\POAHandler\POAHandler>regasm .\bin\Debug\POA
    Handler.dll /tlb:C:\SSRoot\FaellesIndbetaling\Common\POAHandler\POAHandler\poaha
    ndler.tlb /codebase
     * 
     * */
    
    namespace POAHandler
    {
        [Guid("EAA4976A-45C3-4BC5-BC0B-E474F4C3C83F")]
        public interface IPOA_Handler
        {
            bool CreatePoaJob(string POAkoe, string OpgOverskrift, string OpgTekst, string cpr = "", string cvr = "", string forsnr = "");
            void FindPoaJob();
        }
    
        //[Guid("7BD20046-DF8C-44A6-8F6B-687FAA26FA71"),
        //    InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
        //public interface POA_HandlerEvents
        //{
        //    //pt. tom
        //}
    
        [Guid("0D53A3E8-E51A-49C7-944E-E72A2064F938"),
            ClassInterface(ClassInterfaceType.None)/*,
            ComSourceInterfaces(typeof(POA_Handler))*/]
        public class POA_Handler : IPOA_Handler
        {
            public bool CreatePoaJob(string POAkoe, string OpgOverskrift, string OpgTekst, string cpr = "", string cvr = "", string forsnr="")
            {
                POAServiceClient cli = new POAServiceClient();
                var req = new OpretOpgaveRequest();
                req.Header = new Header();
                //req.Header.Action = "Test";
                //req.Header.Caller = "Tester";
                //req.Header.MessageID = Guid.NewGuid();
                //req.Header.TimeStamp = DateTime.Now;
                //req.Header.User = "Tester";
    
                req.Opgave = new Opgave();
                req.Opgave.Emne = EmneEnum.AENDRING; //Fast værdi, iflg. Klaus Munk
                req.Opgave.Forloeb = ForloebEnum.UKENDT; //Giver i Bevakningsorsak: ”Auto”. Der burde stå FBA, men dette er (vist?) ikke muligt.
                req.Opgave.Aarsag = OpgOverskrift;
                req.Opgave.Afdeling = POAkoe; //POA kø
                req.Opgave.Oprettelsesdato = DateTime.Now;
                req.Opgave.Cpr = cpr;
                req.Opgave.Cvr = cvr;
    
                //req.Opgave.Aftalenummer = "1";
                //req.Opgave.Agenturnummer = "1";
                req.Opgave.Forespoergsel = OpgTekst;
                req.Opgave.Forsikringsnummer = forsnr;
                //req.Opgave.Skadesnummer = "1";
    
                var resp = cli.OpretOpgave(req);
                return !string.IsNullOrEmpty(resp.OpgaveIdPOA);
            }
            public void FindPoaJob() //Til brug når POA får denne mulighed
            {
    
            }
        }
    }
    C++ code:
    Code:
    // POA_IF.cpp : Implementation of DLL Exports.
    
    
    // Note: Proxy/Stub Information
    //      To build a separate proxy/stub DLL, 
    //      run nmake -f POA_IFps.mk in the project directory.
    
    #include "stdafx.h"
    #include "resource.h"
    #include <initguid.h>
    #include "POA_IF.h"
    
    #include "POA_IF_i.c"
    
    #import "..\poahandler\poahandler\poahandler.tlb" raw_interfaces_only
    
    CComModule _Module;
    
    BEGIN_OBJECT_MAP(ObjectMap)
    END_OBJECT_MAP()
    
    class CPOA_IFApp : public CWinApp
    {
    public:
    
    // Overrides
    	// ClassWizard generated virtual function overrides
    	//{{AFX_VIRTUAL(CPOA_IFApp)
    	public:
        virtual BOOL InitInstance();
        virtual int ExitInstance();
    	//}}AFX_VIRTUAL
    
    	//{{AFX_MSG(CPOA_IFApp)
    		// NOTE - the ClassWizard will add and remove member functions here.
    		//    DO NOT EDIT what you see in these blocks of generated code !
    	//}}AFX_MSG
    	DECLARE_MESSAGE_MAP()
    
    	void CreatePOAJob(CString JobTitel);
    };
    
    BEGIN_MESSAGE_MAP(CPOA_IFApp, CWinApp)
    	//{{AFX_MSG_MAP(CPOA_IFApp)
    		// NOTE - the ClassWizard will add and remove mapping macros here.
    		//    DO NOT EDIT what you see in these blocks of generated code!
    	//}}AFX_MSG_MAP
    END_MESSAGE_MAP()
    
    CPOA_IFApp theApp;
    
    BOOL CPOA_IFApp::InitInstance()
    {
        _Module.Init(ObjectMap, m_hInstance, &LIBID_POA_IFLib);
        return CWinApp::InitInstance();
    }
    
    int CPOA_IFApp::ExitInstance()
    {
        _Module.Term();
        return CWinApp::ExitInstance();
    }
    
    /////////////////////////////////////////////////////////////////////////////
    // Used to determine whether the DLL can be unloaded by OLE
    
    STDAPI DllCanUnloadNow(void)
    {
        AFX_MANAGE_STATE(AfxGetStaticModuleState());
        return (AfxDllCanUnloadNow()==S_OK && _Module.GetLockCount()==0) ? S_OK : S_FALSE;
    }
    
    /////////////////////////////////////////////////////////////////////////////
    // Returns a class factory to create an object of the requested type
    
    STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
    {
        return _Module.GetClassObject(rclsid, riid, ppv);
    }
    
    /////////////////////////////////////////////////////////////////////////////
    // DllRegisterServer - Adds entries to the system registry
    
    STDAPI DllRegisterServer(void)
    {
        // registers object, typelib and all interfaces in typelib
        return _Module.RegisterServer(TRUE);
    }
    
    /////////////////////////////////////////////////////////////////////////////
    // DllUnregisterServer - Removes entries from the system registry
    
    STDAPI DllUnregisterServer(void)
    {
        return _Module.UnregisterServer(TRUE);
    }
    
    
    void CPOA_IFApp::CreatePOAJob(CString JobTitel)
    {
    	// Initialize COM.
    HRESULT hr = CoInitialize(NULL);
    
    // Create the interface pointer.
    IPOA_Handler pPOA(__uuidof(POA_Handler));
    
    bool lResult = false;
    
    // Call the Add method.
    pPOA->CreatePoaJob("DTPFIR", "FBA siger Hello World CPR, CVR, ForsNr", "Test Opgave fra FBA", "1504650258", "12121212","94-123456", &lResult);
    
    wprintf(L"The result is %d", lResult);
    
    // Uninitialize COM.
    CoUninitialize();
    }
    I had a webservice that I call from Csharp, and I would then make the Csharp code into something that can (also) be accessed using COM. Since I can see, that calling Csharp code from C++ can be a pain, I made a C++ class (also COM) that all the C++ projects can use.

  5. #5
    Join Date
    Jun 2001
    Location
    Denmark
    Posts
    453

    Re: Accessing managed dll from c++

    I hope I was right to post things here. I wasn't sure if it belonged here or in the Csharp branch.

  6. #6
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: Accessing managed dll from c++

    Here are two related threads discussing a COM-free approach that may have some advantages, in particular eliminating the need for DLL registration:

    http://forums.codeguru.com/showthrea...ut-registering.
    http://forums.codeguru.com/showthrea...wrapper-sample

    Perhaps they contain useful information for you.
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  7. #7
    Join Date
    Jun 2001
    Location
    Denmark
    Posts
    453

    Re: Accessing managed dll from c++

    Ah...it seems that what it is really nagging about is that it doesn't like the service reference in the Csharp project, apparently because it doesn't have [ClassInterface(ClassInterfaceType.None)]

  8. #8
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Accessing managed dll from c++

    Quote Originally Posted by Lars_V_J View Post
    I hope I was right to post things here. I wasn't sure if it belonged here or in the Csharp branch.
    Well, in fact your problem has nothing to do with C++, as it's all C#/.NET stuff you get complains about.
    Best regards,
    Igor

  9. #9
    Join Date
    Jun 2001
    Location
    Denmark
    Posts
    453

    Re: Accessing managed dll from c++

    I've tested a little more, and found that the problem isn't only with the C# code.
    I removed the call to the webservice, and just let my function return true all the time. I recompiled, and this time it appeared that there was no problems when registering. However, when I tried to compile in C++, it kept claiming that the namespace for my C# doesn't exist...

  10. #10
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: Accessing managed dll from c++

    Quote Originally Posted by Lars_V_J View Post
    Ah...it seems that what it is really nagging about is that it doesn't like the service reference in the Csharp project, apparently because it doesn't have [ClassInterface(ClassInterfaceType.None)]
    I see. So, using COM as such is not the problem. BTW, I started writing post #6 before your post #4 arrived, so I hadn't already seen it at that point.

    Except for the using declaration right at the top of your C# snippet, I don't see any reference to POA_serviceref in the code you posted at all, so I have no idea what its signature is. Is there any concrete need to expose it to COM at all? The usual reason why you get that warning from tlbexp is that the offending type simply can't be represented in terms of COM, so exposing it as-is probably is not of much use anyway. If you simply applied [ComVisible(true)] at assembly scope and POA_serviceref (which I assume is a class) just inherited that, then explicitly applying [ComVisible(false)] to it would be the simple natural solution.
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  11. #11
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Accessing managed dll from c++

    Quote Originally Posted by Lars_V_J View Post
    I've tested a little more, and found that the problem isn't only with the C# code.
    I removed the call to the webservice, and just let my function return true all the time. I recompiled, and this time it appeared that there was no problems when registering. However, when I tried to compile in C++, it kept claiming that the namespace for my C# doesn't exist...
    Well, it's all C# whatever you think of the situation. Once C++ claims there's no namespace, regasm has registered your dll without any COM compatible types. Please inspect the .tlh file that .tlb ultimately compiles to (or open the .tlb with oleview and see if the library entry is really there, i.e. TLB is not void). In case the header contains no namespace named by assembly name at all, the problem is C#. In case it does have the namespace (and the content is essentially what you need), please make sure your C++ sources reference proper namespace.
    Best regards,
    Igor

  12. #12
    Join Date
    Jun 2001
    Location
    Denmark
    Posts
    453

    Re: Accessing managed dll from c++

    I've checked the generated tlh file, and it does include the correct namespace. (Starts out with namespace PoaHandler {)
    I start the cpp file with
    #import "..\poahandler\poahandler\poahandler.tlb" raw_interfaces_only

    using namespace POAHandler;

    and it claims that it is unknown.

  13. #13
    Join Date
    Jun 2001
    Location
    Denmark
    Posts
    453

    Re: Accessing managed dll from c++

    Doh...upper/lower case problem.

    Now I get a number of other errors. The mentioned line 107 is:
    IPOA_Handler pPOA(__uuidof(POA_Handler));

    I dont have a problem later in the code, when I try to make a call to one of the member functions.
    pPOA.CreatePoaJob((unsigned short*)"DTPFIR", (unsigned short*)"FBA siger Hello World CPR, CVR, ForsNr", (unsigned short*)"Test Opgave fra FBA", (unsigned short*)"1504650258",
    (unsigned short*)"12121212",(unsigned short*)"94-123456", (short*)&lResult);
    That line is okay.


    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : error C2259: 'IPOA_Handler' : cannot instantiate abstract class due to following members:
    c:\ssroot\faellesindbetaling\common\poaif\poa_if\debug\poahandler.tlh(37) : see declaration of 'IPOA_Handler'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'long __stdcall IUnknown::QueryInterface(const struct _GUID &,void ** )' : pure virtual function was not defined
    c:\program files\microsoft sdk\include\unknwn.h(113) : see declaration of 'QueryInterface'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'unsigned long __stdcall IUnknown::AddRef(void)' : pure virtual function was not defined
    c:\program files\microsoft sdk\include\unknwn.h(117) : see declaration of 'AddRef'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'unsigned long __stdcall IUnknown::Release(void)' : pure virtual function was not defined
    c:\program files\microsoft sdk\include\unknwn.h(119) : see declaration of 'Release'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'long __stdcall IDispatch::GetTypeInfoCount(unsigned int *)' : pure virtual function was not defined
    c:\program files\microsoft sdk\include\oaidl.h(2712) : see declaration of 'GetTypeInfoCount'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'long __stdcall IDispatch::GetTypeInfo(unsigned int,unsigned long,struct ITypeInfo ** )' : pure virtual function was not defined
    c:\program files\microsoft sdk\include\oaidl.h(2715) : see declaration of 'GetTypeInfo'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'long __stdcall IDispatch::GetIDsOfNames(const struct _GUID &,unsigned short ** ,unsigned int,unsigned long,long *)' : pure virtual function was not defined
    c:\program files\microsoft sdk\include\oaidl.h(2720) : see declaration of 'GetIDsOfNames'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'long __stdcall IDispatch::Invoke(long,const struct _GUID &,unsigned long,unsigned short,struct tagDISPPARAMS *,struct tagVARIANT *,struct tagEXCEPINFO *,unsigned int
    *)' : pure virtual function was not defined
    c:\program files\microsoft sdk\include\oaidl.h(2727) : see declaration of 'Invoke'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'long __stdcall PoaHandler::IPOA_Handler::CreatePoaJob(unsigned short *,unsigned short *,unsigned short *,unsigned short *,unsigned short *,unsigned short *,short *)'
    : pure virtual function was not defined
    c:\ssroot\faellesindbetaling\common\poaif\poa_if\debug\poahandler.tlh(43) : see declaration of 'CreatePoaJob'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'long __stdcall PoaHandler::IPOA_Handler::FindPoaJob(void)' : pure virtual function was not defined
    c:\ssroot\faellesindbetaling\common\poaif\poa_if\debug\poahandler.tlh(51) : see declaration of 'FindPoaJob'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : error C2259: 'IPOA_Handler' : cannot instantiate abstract class due to following members:
    c:\ssroot\faellesindbetaling\common\poaif\poa_if\debug\poahandler.tlh(37) : see declaration of 'IPOA_Handler'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'long __stdcall IUnknown::QueryInterface(const struct _GUID &,void ** )' : pure virtual function was not defined
    c:\program files\microsoft sdk\include\unknwn.h(113) : see declaration of 'QueryInterface'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'unsigned long __stdcall IUnknown::AddRef(void)' : pure virtual function was not defined
    c:\program files\microsoft sdk\include\unknwn.h(117) : see declaration of 'AddRef'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'unsigned long __stdcall IUnknown::Release(void)' : pure virtual function was not defined
    c:\program files\microsoft sdk\include\unknwn.h(119) : see declaration of 'Release'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'long __stdcall IDispatch::GetTypeInfoCount(unsigned int *)' : pure virtual function was not defined
    c:\program files\microsoft sdk\include\oaidl.h(2712) : see declaration of 'GetTypeInfoCount'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'long __stdcall IDispatch::GetTypeInfo(unsigned int,unsigned long,struct ITypeInfo ** )' : pure virtual function was not defined
    c:\program files\microsoft sdk\include\oaidl.h(2715) : see declaration of 'GetTypeInfo'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'long __stdcall IDispatch::GetIDsOfNames(const struct _GUID &,unsigned short ** ,unsigned int,unsigned long,long *)' : pure virtual function was not defined
    c:\program files\microsoft sdk\include\oaidl.h(2720) : see declaration of 'GetIDsOfNames'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'long __stdcall IDispatch::Invoke(long,const struct _GUID &,unsigned long,unsigned short,struct tagDISPPARAMS *,struct tagVARIANT *,struct tagEXCEPINFO *,unsigned int
    *)' : pure virtual function was not defined
    c:\program files\microsoft sdk\include\oaidl.h(2727) : see declaration of 'Invoke'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'long __stdcall PoaHandler::IPOA_Handler::CreatePoaJob(unsigned short *,unsigned short *,unsigned short *,unsigned short *,unsigned short *,unsigned short *,short *)'
    : pure virtual function was not defined
    c:\ssroot\faellesindbetaling\common\poaif\poa_if\debug\poahandler.tlh(43) : see declaration of 'CreatePoaJob'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : warning C4259: 'long __stdcall PoaHandler::IPOA_Handler::FindPoaJob(void)' : pure virtual function was not defined
    c:\ssroot\faellesindbetaling\common\poaif\poa_if\debug\poahandler.tlh(51) : see declaration of 'FindPoaJob'
    C:\SSRoot\FaellesIndbetaling\Common\PoaIF\POA_IF\POA_IF.cpp(107) : error C2664: '__thiscall PoaHandler::IPOA_Handler::PoaHandler::IPOA_Handler(const struct PoaHandler::IPOA_Handler &)' : cannot convert parameter 1 from 'const struct _GUID' to 'const
    struct PoaHandler::IPOA_Handler &'
    Reason: cannot convert from 'const struct _GUID' to 'const struct PoaHandler::IPOA_Handler'
    No constructor could take the source type, or constructor overload resolution was ambiguous

  14. #14
    Join Date
    Jun 2001
    Location
    Denmark
    Posts
    453

    Re: Accessing managed dll from c++

    Contents of tlh file:
    Code:
    // Created by Microsoft (R) C/C++ Compiler Version 12.00.9782.0 (d7df5201).
    //
    // c:\ssroot\faellesindbetaling\common\poaif\poa_if\debug\poahandler.tlh
    //
    // C++ source equivalent of Win32 type library ..\poahandler\poahandler\poahandler.tlb
    // compiler-generated file created 03/22/13 at 09:13:45 - DO NOT EDIT!
    
    #pragma once
    #pragma pack(push, 8)
    
    #include <comdef.h>
    
    namespace PoaHandler {
    
    //
    // Forward references and typedefs
    //
    
    struct __declspec(uuid("e2b23c88-e9dc-32b7-8c01-a05d04432e4c"))
    /* dual interface */ IPOA_Handler;
    struct /* coclass */ POA_Handler;
    struct __declspec(uuid("a696f4da-3672-3464-bbbd-1516d014fcf9"))
    /* dual interface */ _POA_Handler;
    
    //
    // Smart pointer typedef declarations
    //
    
    _COM_SMARTPTR_TYPEDEF(IPOA_Handler, __uuidof(IPOA_Handler));
    _COM_SMARTPTR_TYPEDEF(_POA_Handler, __uuidof(_POA_Handler));
    
    //
    // Type library items
    //
    
    struct __declspec(uuid("e2b23c88-e9dc-32b7-8c01-a05d04432e4c"))
    IPOA_Handler : IDispatch
    {
        //
        // Raw methods provided by interface
        //
    
        virtual HRESULT __stdcall CreatePoaJob (
            BSTR POAkoe,
            BSTR OpgOverskrift,
            BSTR OpgTekst,
            BSTR cpr,
            BSTR cvr,
            BSTR forsnr,
            VARIANT_BOOL * pRetVal ) = 0;
        virtual HRESULT __stdcall FindPoaJob ( ) = 0;
    };
    
    struct __declspec(uuid("cb06cc60-7080-3e60-9ce8-1b35083442e2"))
    POA_Handler;
        // [ default ] interface _POA_Handler
        // interface _Object
        // interface IPOA_Handler
    
    struct __declspec(uuid("a696f4da-3672-3464-bbbd-1516d014fcf9"))
    _POA_Handler : IDispatch
    {};
    
    } // namespace PoaHandler
    
    #pragma pack(pop)

  15. #15
    Join Date
    Mar 2013
    Posts
    1

    Re: Accessing managed dll from c++

    copy CADO-VN1. COM de xem chi tiet huong dan

    huong dan ca cuoc tren mang
    huong dan ca cuoc online
    huong dan ca do bong da
    huong dan ca cuoc bong da
    huong dan ca do tren mang
    huong dan ca cuoc tren mang

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured