Hello, (sorry for my english, i'm french ^^)

I try to implement CharToOem function in my code for use accent in windows console but she doesn't work, i have one error from xamarin studio : "bool.main.CharToOem(const char*, char*) could not be resolved - librairy reference missing" :'(.

CharToOem Function :

BOOL WINAPI CharToOem(
  _In_   LPCTSTR lpszSrc,
  _Out_  LPSTR lpszDst
);

LPCTSTR = const char* or const wchar_t* depending on _UNICODE.
LPSTR = char*

My code is :

import std.c.windows.windows;
extern (Windows) bool CharToOem(const char*, char*);

public void PutStringIntoConsole(string text)
{
        char[] source = text.dup;
        char[] dest;

        CharToOem(source.ptr, dest.ptr);
        writeln(dest);
}

Can you help me please, i'm novice in D.

Reply via email to