Skip to content

INT/DWORD to PTR Ambiguous user defined conversions error #1778

@cpyrgas

Description

@cpyrgas

Following used to work without errors, results to an error in X# 3.0. Guess it should work ok in x86 mode?

// error XS0457: Ambiguous user defined conversions 'psz.implicit operator psz(ptr)' and 'psz.implicit operator psz(byte*)' when converting from 'int' to 'psz'

_DLL FUNC Escape(hDC AS PTR,   nEscape AS INT, cbInput AS INT, lpvInData AS PSZ,;
	lpvOutData AS PTR) AS INT PASCAL:gdi32.Escape

FUNCTION Start() AS VOID
LOCAL n AS INT
LOCAL d AS DWORD
Escape(NULL_PTR,0,0,n,NULL_PTR) // error XS0457
Escape(NULL_PTR,0,0,d,NULL_PTR) // error XS0457

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