Click here to Skip to main content
15,914,111 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Run .Net1.1 and 2.0 at same time Pin
Vince.Ro28-Dec-08 13:44
Vince.Ro28-Dec-08 13:44 
QuestionInterface and GetType() - works in C# but not in VB? Pin
David Hovey25-Dec-08 12:37
David Hovey25-Dec-08 12:37 
AnswerRe: Interface and GetType() - works in C# but not in VB? Pin
cterrinw27-Sep-09 19:32
cterrinw27-Sep-09 19:32 
GeneralRe: Interface and GetType() - works in C# but not in VB? Pin
David Hovey27-Sep-09 19:37
David Hovey27-Sep-09 19:37 
GeneralRe: Interface and GetType() - works in C# but not in VB? Pin
cterrinw27-Sep-09 20:48
cterrinw27-Sep-09 20:48 
AnswerRe: Interface and GetType() - works in C# but not in VB? Pin
BrianHoover2-Jan-10 1:04
BrianHoover2-Jan-10 1:04 
GeneralRe: Interface and GetType() - works in C# but not in VB? Pin
David Hovey2-Jan-10 3:10
David Hovey2-Jan-10 3:10 
QuestionInterface code from C# to VB.NET Pin
David Hovey25-Dec-08 9:12
David Hovey25-Dec-08 9:12 
Hello. I am trying to implement drag and drop in my application (from Outlook messages and message attachments) I found the code on a Code Project post, but it is for C#. My application is written in VB, so I'd rather convert the code to VB than add a required DLL to what my program requires.

I need help with the below lines of code. Where I need help is at the CreateStream function for example. I cannot find a equivalent for the "return" section of "[return: MarshalAs(UnmanagedType.Interface)]"

Can you help me?

Thanks.

[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("0000000B-0000-0000-C000-000000000046")]
public interface IStorage
{
    [return: MarshalAs(UnmanagedType.Interface)]
    IStream CreateStream([In, MarshalAs(UnmanagedType.BStr)] string pwcsName, [In, MarshalAs(UnmanagedType.U4)] int grfMode, [In, MarshalAs(UnmanagedType.U4)] int reserved1, [In, MarshalAs(UnmanagedType.U4)] int reserved2);
    [return: MarshalAs(UnmanagedType.Interface)]
    IStream OpenStream([In, MarshalAs(UnmanagedType.BStr)] string pwcsName, IntPtr reserved1, [In, MarshalAs(UnmanagedType.U4)] int grfMode, [In, MarshalAs(UnmanagedType.U4)] int reserved2);
    [return: MarshalAs(UnmanagedType.Interface)]
    IStorage CreateStorage([In, MarshalAs(UnmanagedType.BStr)] string pwcsName, [In, MarshalAs(UnmanagedType.U4)] int grfMode, [In, MarshalAs(UnmanagedType.U4)] int reserved1, [In, MarshalAs(UnmanagedType.U4)] int reserved2);
    [return: MarshalAs(UnmanagedType.Interface)]
    IStorage OpenStorage([In, MarshalAs(UnmanagedType.BStr)] string pwcsName, IntPtr pstgPriority, [In, MarshalAs(UnmanagedType.U4)] int grfMode, IntPtr snbExclude, [In, MarshalAs(UnmanagedType.U4)] int reserved);
    void CopyTo(int ciidExclude, [In, MarshalAs(UnmanagedType.LPArray)] Guid[] pIIDExclude, IntPtr snbExclude, [In, MarshalAs(UnmanagedType.Interface)] IStorage stgDest);
    void MoveElementTo([In, MarshalAs(UnmanagedType.BStr)] string pwcsName, [In, MarshalAs(UnmanagedType.Interface)] IStorage stgDest, [In, MarshalAs(UnmanagedType.BStr)] string pwcsNewName, [In, MarshalAs(UnmanagedType.U4)] int grfFlags);
    void Commit(int grfCommitFlags);
    void Revert();
    void EnumElements([In, MarshalAs(UnmanagedType.U4)] int reserved1, IntPtr reserved2, [In, MarshalAs(UnmanagedType.U4)] int reserved3, [MarshalAs(UnmanagedType.Interface)] out object ppVal);
    void DestroyElement([In, MarshalAs(UnmanagedType.BStr)] string pwcsName);
    void RenameElement([In, MarshalAs(UnmanagedType.BStr)] string pwcsOldName, [In, MarshalAs(UnmanagedType.BStr)] string pwcsNewName);
    void SetElementTimes([In, MarshalAs(UnmanagedType.BStr)] string pwcsName, [In] System.Runtime.InteropServices.ComTypes.FILETIME pctime, [In] System.Runtime.InteropServices.ComTypes.FILETIME patime, [In] System.Runtime.InteropServices.ComTypes.FILETIME pmtime);
    void SetClass([In] ref Guid clsid);
    void SetStateBits(int grfStateBits, int grfMask);
    void Stat([Out]out System.Runtime.InteropServices.ComTypes.STATSTG pStatStg, int grfStatFlag);
}

QuestionProblem with dot net (Window forms) user control in Vb6 application Pin
Nitin198125-Dec-08 6:42
Nitin198125-Dec-08 6:42 
AnswerRe: Problem with dot net (Window forms) user control in Vb6 application Pin
Not Active25-Dec-08 12:21
mentorNot Active25-Dec-08 12:21 
GeneralRe: Problem with dot net (Window forms) user control in Vb6 application Pin
Nitin198125-Dec-08 18:21
Nitin198125-Dec-08 18:21 
Questionhow many types i use web.config Pin
Pramod Joshi24-Dec-08 0:30
Pramod Joshi24-Dec-08 0:30 
AnswerRe: how many types i use web.config Pin
Brij24-Dec-08 1:04
mentorBrij24-Dec-08 1:04 
Questionhow to bind gridview using Pin
nileshbahirshet23-Dec-08 22:06
nileshbahirshet23-Dec-08 22:06 
AnswerRe: how to bind gridview using Pin
Brij24-Dec-08 0:52
mentorBrij24-Dec-08 0:52 
Questionproblem in reading the xml in vb.net Pin
nileshbahirshet23-Dec-08 20:58
nileshbahirshet23-Dec-08 20:58 
AnswerRe: problem in reading the xml in vb.net Pin
Not Active24-Dec-08 3:35
mentorNot Active24-Dec-08 3:35 
Questiontransparent pictureboxes in C# Pin
Umangj23-Dec-08 6:14
Umangj23-Dec-08 6:14 
AnswerRe: transparent pictureboxes in C# Pin
Rob Smiley23-Dec-08 6:42
Rob Smiley23-Dec-08 6:42 
AnswerRe: transparent pictureboxes in C# Pin
Tristan Rhodes23-Dec-08 22:52
Tristan Rhodes23-Dec-08 22:52 
AnswerRe: transparent pictureboxes in C# Pin
Pete O'Hanlon23-Dec-08 22:53
mvePete O'Hanlon23-Dec-08 22:53 
GeneralNo PictureBox Pin
Luc Pattyn24-Dec-08 3:06
sitebuilderLuc Pattyn24-Dec-08 3:06 
GeneralRe: No PictureBox Pin
Umangj24-Dec-08 4:58
Umangj24-Dec-08 4:58 
GeneralRead the documentation Pin
Luc Pattyn24-Dec-08 5:39
sitebuilderLuc Pattyn24-Dec-08 5:39 
QuestionCan we create 16 bit application or dll in .Net Pin
Naveed72723-Dec-08 5:53
Naveed72723-Dec-08 5:53 

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.