Hello Przemek and all,

Note: I am not from C background so...

The next day I was struggling with this code:

   char szLibName[ MAX_PATH + 1 ] = { 0 };

   GetSystemDirectory( szLibName, MAX_PATH );
   hb_strncat( szLibName, "\\atl.dll", sizeof( szLibName ) - 1 );
   hLib = LoadLibrary( ( LPCSTR ) szLibName );

it works flawless without UNICODE. 

Then for UNICODE I tried various ways to get it working but failed, 
always errors or suspicious pointers warnings appeared.

Then I settled with this code:

      LPTSTR cDll = HB_TCHAR_CONVTO( "atl.dll" );
      hLib = LoadLibrary( cDll );
      HB_TCHAR_FREE( cDll );

It loads the library but I am afraid under circumstances where 'system32' is 
not defined under 'PATH' envvar, it is bound to fail.

My request is some functions where I send two strings, one TCHAR another 
just a text as:

   TCHAR szLibName[ MAX_PATH + 1 ];
   GetSystemDirectory( szLibName, MAX_PATH );
   hb_strncat_ex( szLibName, "\\atl.dll", sizeof( szLibName ) - 1 );  //
imaginary 

I mean a few C level functions which make the string conversion tasks
easier, 
at least for poor C programmers like me.

I can expect those are already there is Harbour...

Regards
Pritpal Bedi



-- 
View this message in context: 
http://www.nabble.com/C-and-Unicode-compliant-string-conversions-tp20721945p20721945.html
Sent from the Harbour - Dev mailing list archive at Nabble.com.

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to