Click here to Skip to main content
15,922,696 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
General24Bit BITMAP Pin
_crs_1-Jul-03 1:38
_crs_1-Jul-03 1:38 
GeneralRe: 24Bit BITMAP Pin
basementman1-Jul-03 5:13
basementman1-Jul-03 5:13 
GeneralRe: 24Bit BITMAP Pin
_crs_2-Jul-03 1:46
_crs_2-Jul-03 1:46 
GeneralVisual Studio file associations Pin
User 66581-Jul-03 1:36
User 66581-Jul-03 1:36 
GeneralRe: Visual Studio file associations Pin
Ryan Binns1-Jul-03 2:13
Ryan Binns1-Jul-03 2:13 
GeneralRe: Visual Studio file associations Pin
User 66581-Jul-03 2:20
User 66581-Jul-03 2:20 
GeneralRe: Visual Studio file associations Pin
Ryan Binns1-Jul-03 2:27
Ryan Binns1-Jul-03 2:27 
GeneralGetObjectsForNativeVariants Pin
vikramlinux1-Jul-03 1:26
vikramlinux1-Jul-03 1:26 
Anybody know how to use the Marshal.GetObjectsForNativeVariants function.I want to transfer the data from Unmanaged Win32 DLL to C# DLL.but the restriction is that I can only use IntPtr as passing param.
Like
Win32 DLL

I created One SafeArray
SAFEARRAY *pSA;
//Some code
pSA = SafeArrayCreate(VT_BSTR...);

SafeArrayPutElement(pSA...,String here );//safearray is full of BSTR Strings

then I called the C# DLL function
pData->ISetIntData((long)pSA);

And in C# DLL

public void ISetIntData(IntPtr Val)
{
Object[] MyObj=Marshal.GetObjectsForNativeVariants(Val,2);
String str=(String)MyObj[0];
MessageBox.Show(str);
//Here It is crashing...
}

Is this a right way Or I am doing some crazy Stuff?





Vikram


Vikram
GeneralProblem with serialization. Pin
Svin1-Jul-03 1:13
Svin1-Jul-03 1:13 
GeneralRe: Problem with serialization. Pin
Nuehli1-Jul-03 1:43
Nuehli1-Jul-03 1:43 
GeneralRe: Problem with serialization. Pin
Svin1-Jul-03 2:20
Svin1-Jul-03 2:20 
GeneralRe: Problem with serialization. Pin
Nuehli1-Jul-03 2:44
Nuehli1-Jul-03 2:44 
GeneralRe: Problem with serialization. Pin
Svin1-Jul-03 2:56
Svin1-Jul-03 2:56 
QuestionHow to use multiple #if defined ? Pin
Bjarne Jørgensen1-Jul-03 0:53
Bjarne Jørgensen1-Jul-03 0:53 
AnswerRe: How to use multiple #if defined ? Pin
Ryan Binns1-Jul-03 2:19
Ryan Binns1-Jul-03 2:19 
GeneralRe: How to use multiple #if defined ? Pin
Bjarne Jørgensen1-Jul-03 2:40
Bjarne Jørgensen1-Jul-03 2:40 
GeneralRe: How to use multiple #if defined ? Pin
Ryan Binns1-Jul-03 3:25
Ryan Binns1-Jul-03 3:25 
Generalcombo box problem Pin
si_691-Jul-03 0:49
si_691-Jul-03 0:49 
GeneralRe: combo box problem Pin
User 66581-Jul-03 1:26
User 66581-Jul-03 1:26 
GeneralRe: combo box problem Pin
vikramlinux1-Jul-03 1:47
vikramlinux1-Jul-03 1:47 
GeneralProblem with printing of bitmap pattern with CBrush Pin
Muhammad Kamran1-Jul-03 0:48
Muhammad Kamran1-Jul-03 0:48 
GeneralRe: Problem with printing of bitmap pattern with CBrush Pin
basementman1-Jul-03 5:24
basementman1-Jul-03 5:24 
GeneralDeleting Files. Pin
Saty1-Jul-03 0:23
Saty1-Jul-03 0:23 
GeneralRe: Deleting Files. Pin
Ravi Bhavnani1-Jul-03 3:20
professionalRavi Bhavnani1-Jul-03 3:20 
GeneralRe: Deleting Files. Pin
basementman1-Jul-03 5:35
basementman1-Jul-03 5:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.