none
ole32.dll in VB.NET 4.0 RRS feed

  • Question

  • Hi,

    I have a VB.NET program which calls a function (FmtIdToPropStgName) in ole32.dll.

    <DllImport("ole32.dll")> _
    Friend FunctionFmtIdToPropStgName( _
    <
    [In]()> ByRef FMTID As Guid, _
    <
    Out(), MarshalAs(UnmanagedType.LPWStr)> ByVal oszName As StringBuilder) As Integer
    End
    Function

    This works fine in .NET 3.5, but when I compile this app with .NET 4.0 I get a crash while calling this function. There isn't much of the detail provided by the crash.

    What could be the problem?

    Thanks,
    Chetan.


    Additional Info:

    Crashes only while getting storage name of "Document Summary Information" storage from GUID D5CDD502-2E9C-101B-9397-08002B2CF9AE.

    Tuesday, May 31, 2011 10:52 AM

All replies

  •  

    Hi chetanaru,

     

    Could you please provide more code snippet where uses this function? And the application is running on 32-bit OS or 64-bit OS? And what's the platform option of project?

     

    Any more information that helps us reproduce this issue is appreciated.

    Thanks.


    Paul Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, June 2, 2011 7:33 AM