Hi! This is my test program:

#include <windows.h>
#include <ktmw32.h>
int main(){
  HANDLE transaction = CreateTransaction(NULL, NULL, 0, 0, 0, 0, L"my descr");
  if (transaction != INVALID_HANDLE_VALUE)
    CloseHandle(transaction);
}

== 1. Bogus warning ==
Using x64-4.8.1-release-win32-seh-rev4.7z compilation succeeds but
shows a warning:

D:\test>gcc test.c -lkernel32 -lktmw32
test.c: In function 'main':
test.c:4:23: warning: initialization makes pointer from integer
without a cast [enabled by default]
  HANDLE transaction = CreateTransaction(NULL, NULL, 0, 0, 0, 0, L"my descr");
                       ^

== 2. Link error ==
Using x32-4.8.1-release-win32-dwarf-rev4.7z also shows a warning but
fails to link:

D:\test>gcc test.c -lkernel32 -lktmw32
test.c: In function 'main':
test.c:4:23: warning: initialization makes pointer from integer
without a cast [enabled by default]
  HANDLE transaction = CreateTransaction(NULL, NULL, 0, 0, 0, 0, L"my descr");
                       ^
D:\Data\Temp\1\ccnbgxxV.o:test.c:(.text+0x4e): undefined reference to
`CreateTransaction'
collect2.exe: error: ld returned 1 exit status

The same link error happens with an advapi32.lib function
RegCreateKeyTransactedW(). So it's not only CreateTransaction() or
ktmw32.lib that cause problems in 32-bit.


Please, fix.

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to