2 * This example demonstrates dynamical loading of (internal) Win32 DLLS.
3 * I dont know why this was called hello5 in the wine tree - sedwards
8 int PASCAL
WinMain (HINSTANCE inst
, HINSTANCE prev
, LPSTR cmdline
, int show
)
11 void CALLBACK (*fnGetSystemInfo
)(LPSYSTEM_INFO si
);
14 kernel32
= LoadLibrary("KERNEL32");
15 if (kernel32
== NULL
) {
16 fprintf(stderr
,"FATAL: could not load KERNEL32!\n");
19 fnGetSystemInfo
= (void*)GetProcAddress(kernel32
,"GetSystemInfo");
20 if (!fnGetSystemInfo
) {
21 fprintf(stderr
,"FATAL: could not find GetSystemInfo!\n");
25 fprintf(stderr
,"QuerySystemInfo returns:\n");
26 fprintf(stderr
," wProcessorArchitecture: %d\n",si
.u
.s
.wProcessorArchitecture
);
27 fprintf(stderr
," dwPageSize: %ld\n",si
.dwPageSize
);
28 fprintf(stderr
," lpMinimumApplicationAddress: %p\n",si
.lpMinimumApplicationAddress
);
29 fprintf(stderr
," lpMaximumApplicationAddress: %p\n",si
.lpMaximumApplicationAddress
);
30 fprintf(stderr
," dwActiveProcessorMask: %ld\n",si
.dwActiveProcessorMask
);
31 fprintf(stderr
," dwNumberOfProcessors: %ld\n",si
.dwNumberOfProcessors
);
32 fprintf(stderr
," dwProcessorType: %ld\n",si
.dwProcessorType
);
33 fprintf(stderr
," dwAllocationGranularity: %ld\n",si
.dwAllocationGranularity
);
34 fprintf(stderr
," wProcessorLevel: %d\n",si
.wProcessorLevel
);
35 fprintf(stderr
," wProcessorRevision: %d\n",si
.wProcessorRevision
);