Click here to Skip to main content
15,916,683 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
Questionoutput to console in Vc++2005 Pin
lavy288315-May-07 1:55
lavy288315-May-07 1:55 
AnswerRe: output to console in Vc++2005 Pin
Mark Salsbery15-May-07 5:55
Mark Salsbery15-May-07 5:55 
AnswerRe: output to console in Vc++2005 Pin
StevenS_Dev21-May-07 4:10
StevenS_Dev21-May-07 4:10 
GeneralRe: output to console in Vc++2005 Pin
lavy288321-May-07 4:12
lavy288321-May-07 4:12 
Questionmissing ; before * Pin
subramanyeswari14-May-07 22:48
subramanyeswari14-May-07 22:48 
AnswerRe: missing ; before * Pin
Mark Salsbery15-May-07 5:51
Mark Salsbery15-May-07 5:51 
Question__loctotime_t problem Pin
bouli14-May-07 21:12
bouli14-May-07 21:12 
QuestionThe good, the bad and the ugly (or C#, COM and C++/CLI) Pin
originSH14-May-07 5:11
originSH14-May-07 5:11 
I have a little bit of interop in C# which calls StgOpenStorageEx and returns an IStorage COM object:

[DllImport("ole32.dll")]
//AJ: http://www.pinvoke.net/default.aspx/ole32/StgOpenStorageEx.html
//AJ: http://msdn2.microsoft.com/en-us/library/aa380342.aspx
private static extern int StgOpenStorageEx([MarshalAs(UnmanagedType.LPWStr)]string pwcsName,
uint grfMode,
uint stgfmt,
uint grfAttrs,
ref STGOPTIONS pStgOptions,
IntPtr reserved2,
[In] ref Guid riid,
[MarshalAs(UnmanagedType.IUnknown)] out object ppObjectOpen);

IStorage structuredStorageFile = (IStorage )ppObjectOpen;


The IStorage interface isn't defined in the BCL's so we're making it ourselves:

[ComImport]
[Guid("0000000b-0000-0000-C000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
//AJ: http://www.pinvoke.net/default.aspx/Interfaces/IStorage.html
public interface IStorage
{ ... }


This object is used in various places inside our C# code with perfectly good results and all is well. Now though we're wanting to pull that object into C++/CLI, which is no problem. Then we want to pass it to 'BindIFilterFromStorage' to retrive the appropriate IFilter, which is a problem. We've had a bit of a poke around and tried getting 'BindIFilterFromStorage' to take the object but we just get '8000ffff' Catastrophic failure all the time.


If any one could shead any light on how we can achive this or indeed even if its just not possible that would be great!



Andy

Questionerror in readxml with database Pin
lavy288314-May-07 5:10
lavy288314-May-07 5:10 
AnswerRe: error in readxml with database Pin
originSH14-May-07 5:53
originSH14-May-07 5:53 
Questionreadxml with dataset Pin
lavy288314-May-07 4:18
lavy288314-May-07 4:18 
AnswerRe: readxml with dataset Pin
Hamid_RT22-May-07 2:04
Hamid_RT22-May-07 2:04 
GeneralRe: readxml with dataset Pin
lavy288322-May-07 5:30
lavy288322-May-07 5:30 
GeneralRe: readxml with dataset Pin
lavy288322-May-07 5:31
lavy288322-May-07 5:31 
GeneralRe: readxml with dataset Pin
Hamid_RT22-May-07 7:40
Hamid_RT22-May-07 7:40 
AnswerRe: AfxMessageBox and Strings!!! Pin
led mike14-May-07 4:51
led mike14-May-07 4:51 
QuestionHow to pass a function as an argument to other function Pin
subramanyeswari14-May-07 3:12
subramanyeswari14-May-07 3:12 
AnswerRe: How to pass a function as an argument to other function Pin
led mike14-May-07 4:53
led mike14-May-07 4:53 
GeneralRe: How to pass a function as an argument to other function Pin
subramanyeswari14-May-07 18:34
subramanyeswari14-May-07 18:34 
AnswerRe: How to pass a function as an argument to other function Pin
Hamid_RT22-May-07 2:01
Hamid_RT22-May-07 2:01 
QuestionComplicated array problem Pin
NeoCoded14-May-07 2:17
NeoCoded14-May-07 2:17 
AnswerRe: Complicated array problem Pin
Mark Salsbery14-May-07 5:29
Mark Salsbery14-May-07 5:29 
GeneralRe: Complicated array problem Pin
NeoCoded14-May-07 6:17
NeoCoded14-May-07 6:17 
GeneralRe: Complicated array problem Pin
Mark Salsbery14-May-07 6:24
Mark Salsbery14-May-07 6:24 
Questioncannot convert from CString* to CString& Pin
subramanyeswari14-May-07 0:29
subramanyeswari14-May-07 0:29 

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.