T
timor.super
Hi all,
I'm trying to use a .net api from unmanaged MFC code.
I'm trying to use ClrCreateManagedInstance api, but as shown above,
my
var pDisp equals null before the ClrCreateManagedInstance call.
Can you correct my code ? (Or any other way to do that ?)
#include "mscoree.h"
#pragma comment (lib, "mscoree.lib")
CComPtr<IDispatch> pDisp;
HRESULT hr = S_OK;
hr = ClrCreateManagedInstance(L"System.Windows.Forms.MessageBox,
System.Windows.Forms, Version=2.0.50727.42, Culture=neutral,
PublicKeyToken=b77a5c561934e089",IID_IDispatch, (void**)&pDisp);
Thansk in advance for your help,
Best,
S.
I'm trying to use a .net api from unmanaged MFC code.
I'm trying to use ClrCreateManagedInstance api, but as shown above,
my
var pDisp equals null before the ClrCreateManagedInstance call.
Can you correct my code ? (Or any other way to do that ?)
#include "mscoree.h"
#pragma comment (lib, "mscoree.lib")
CComPtr<IDispatch> pDisp;
HRESULT hr = S_OK;
hr = ClrCreateManagedInstance(L"System.Windows.Forms.MessageBox,
System.Windows.Forms, Version=2.0.50727.42, Culture=neutral,
PublicKeyToken=b77a5c561934e089",IID_IDispatch, (void**)&pDisp);
Thansk in advance for your help,
Best,
S.