[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] winapi long filenames

From: xlono01
Subject: [Tinycc-devel] winapi long filenames
Date: Tue, 10 May 2011 19:22:53 +0200

Please, I tried to call windows API for file operations (SHFileOperations). I am having some problem with long filenames. I tried both SHFileOperationsA() and SHFileOperationsW(), but so far I was not able to handle long filenames properly. I set the parameter structure for SHFileOperations winapi to perform copy abcdefghijkl.txt to 123456789.txt, but after I run it I am getting 12345678.txt, an 8.3 filename, the rest of the long filename is just getting cut off.
Any idea what am I doing wrong? 
Probably important to mention, I did not do "#include <windows.h>". Instead of that, I did the following: 1. used tiny_impdef.exe on shell32.dll (and the 3 other main dlls) to generate shell32.def (and the 3 other .def files), 2. added winapi declaration directly to my c program, without any includes, like this: "int WINAPI SHFileOperationW( LPSHFILEOPSTRUCTW );" (together with all related definitions like WINAPI, LPSHFILEOPSTRUCTW, etc..).
Would it be helpful to anyone if I send example code?
With regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]