Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Wrong conversion of method returns wchar_t* #241

Copy link
Copy link

Description

@Ilyasml
Issue body actions

Hello

I have an interface which looks like

class IString
{
public:
	virtual const wchar_t* String() = 0;
	virtual HRESULT  SetStringOutProp(const wchar_t* Value) = 0;
};

where method const wchar_t* String() converts to

 /// <summary>
 /// No documentation.
 /// </summary>
 /// <returns>No documentation.</returns>
 /// <unmanaged>const wchar_t* IString::String()</unmanaged>
 /// <unmanaged-short>IString::String</unmanaged-short>
 public unsafe System.String String()
 {
     System.String __result__;
     System.IntPtr __result__native;
     __result__native = TrySharpGenTools.LocalInterop.CalliThisCallSystemIntPtr(this._nativePointer, (*(void ***)this._nativePointer)[0]);
     return __result__;
 }

the code above ( public unsafe System.String String()) gives error of

1>D:\Projects\ForLinuxTranslation\Current\TrySharpGenTools\TrySharpGenTools\obj\Debug\net8.0\SharpGen\Generated\Interfaces.cs(91,20,91,30): error CS0165: Use of unassigned local variable '__result__' 
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.