Skip to content
Snippets Groups Projects
Commit 988ca977 authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

Release 940620

Mon Jun 20 14:26:41 1994  Bob Amstadt  (bob@pooh)

	* [objects/bitmap.c]
	Allow negative bitmap sizes.

Sun Jun 19 12:00:04 1994  David Metcalfe <david@prism.demon.co.uk>

        * [controls/edit.c]
        Improved selection display.  Added processing for WM_SETFONT,
        EM_REPLACESEL, EM_LINELENGTH, EM_UNDO, EM_EMPTYUNDOBUFFER,
        EM_GETHANDLE, EM_SETHANDLE messages.  Text buffer now stored on 
        application's local heap.

        * [windows/graphics.c]
        Corrected bug in Rectangle().  XFillRectangle has the same
        width as Rectangle, but XDrawRectangle is one pixel wider
        for the same co-ordinates.

        * [memory/heap.c] [include/heap.h]
        Added HEAP_LocalSize function.

        * [windows/event.c] [windows/keyboard.c]
        Improvements to KeyStateTable and addition of AsyncKeyStateTable.
        Added supporting code to GetKeyState and GetAsyncKeyState and
        merged mouse button states into GetKeyboardState.

        * [loader/resource.c] [include/accel.h]
        Added recognition of SHIFT, CONTROL and ALT keys to
        TranslateAccelerator.

        * [objects/metafile.c] [objects/font.c] [objects/bitblt.c]
        A bit more metafile support.

Sun Jun 19 17:29:00 MET DST 1994  Erik Bos (erik@hacktic.nl)

        * [loader/resource.c]
        SizeofResource() and AllocResource() added, AccessResource() updated.

        * [if1632/kernel.spec]
        FreeLibrary() used for FreeModule().

        * [windows/graphics.c]
        Rectangle(): swap left & right corners when right < left,
        swap top & bottom when botton < top.

Jun 19, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)

	* [controls/combo.c]
	Fix bug in window style of the associated listbox.

	* [controls/menu.c]
	Skip separators in keyboard navigation by using new internal 
		functions SelectPrevItem() & SelectNextItem(),

	* [misc/profile.c]
	Bug fix in GetPrivateProfileInt(), was limited to 4 digit,
		IntBuf must be alloc to (5+1)=6. char instead of 5.

	* [misc/main.c]
	Put code in functions SetEnvironment() & GetEnvironment().

	* [misc/shell.c]
	Start putting some code in ExtractIcon() function.

	* [misc/mmsystem.c]
	Some code for MMTimer functions & timers list.

	* [miscemu/int31.c]
	Few stubs for DPMI interrupt calls. Nothing work yet.

Mon Jun 20 07:37:43 EDT 1994	John Richardson (jrichard@cs.uml.edu)

	* include/win.h (tagWND):
	Added icon fields icon, hIcon and rectClientSave to 
	the tagWND struct.

	* windows/Imakefile
	Added icon.c to the list of files to compile

	* windows/dce.c (GetDCEx):
	Added some checks for iconic mode and pass icon window as drawable,
	not the real window.

	* windows/defwnd.c (DefWindowProc)
	Added PAINTICON default windows procedure.

	* windows/event.c (EVENT_Expose)
	Added check for iconic window expose. If iconic window is exposed
	send a WM_PAINTICON message

	* windows/icon.c 
	New file.  ICON_Iconify, ICON_findIconFromPoint, ICON_Deiconify.

	* windows/mdi.c (DefMDIChildProc)
	Test for IsIconic during a SC_RESTORE, this doesn't work yet.

	* windows/message.c (hardware_event)
	Looks for icon as well as window now.

	* windows/nonclient.c (NC_HandleSysCommand, NC_DoNCPaintIcon)
	Added iconify/deiconify in NC_HandleSysCommand, new function
	NC_DoNCPaintIcon which paints an icon.

	* windows/painting.c (BeginPaint)
	Made a BeginPaint select the STOCK_BLACK_PEN, STOCK_WHITE_BRUSH,
	and STOCK_SYSTEM_FONT objects since this is (hopefully) default
	windows behavior.

	* windows/win.h (CreateWindowEx)
	Set the default background color of a window to be white.
	Create icon window, turn off MINIMIZE if it is on, since
	I don't know what to do with it as of yet... register
	the icon with the hwnd of its window so we can identify where
	icon messages are coming from.

Mon Jun 20 10:15:59 1994  Miguel de Icaza  (miguel@sphinx)

	* windows/event.c: Added a hack to define XPointer when using
	X11R4. 

	* toolkit/hello.c: Test application for WineLib. To compile you'll
	need: gcc -Iinclude -DWINELIB -g hello.c -c, and to link you'll
	need: gcc hello.o libwine.a -lX11 -L/usr/openwin/lib -lm 

	* toolkit/heap.c: Extended the size of the block size per chunk.

	* misc/stress.c (GetFreeFileHandles): Fixed typo.

	* misc/main.c (main): Changes to allow compilation under SunOS. 

	* loader/library.c: Changed some ifdefs to compile WineLib.
parent 7cc9c0ce
No related branches found
No related tags found
No related merge requests found
----------------------------------------------------------------------
Mon Jun 20 14:26:41 1994 Bob Amstadt (bob@pooh)
* [objects/bitmap.c]
Allow negative bitmap sizes.
Sun Jun 19 12:00:04 1994 David Metcalfe <david@prism.demon.co.uk>
* [controls/edit.c]
Improved selection display. Added processing for WM_SETFONT,
EM_REPLACESEL, EM_LINELENGTH, EM_UNDO, EM_EMPTYUNDOBUFFER,
EM_GETHANDLE, EM_SETHANDLE messages. Text buffer now stored on
application's local heap.
* [windows/graphics.c]
Corrected bug in Rectangle(). XFillRectangle has the same
width as Rectangle, but XDrawRectangle is one pixel wider
for the same co-ordinates.
* [memory/heap.c] [include/heap.h]
Added HEAP_LocalSize function.
* [windows/event.c] [windows/keyboard.c]
Improvements to KeyStateTable and addition of AsyncKeyStateTable.
Added supporting code to GetKeyState and GetAsyncKeyState and
merged mouse button states into GetKeyboardState.
* [loader/resource.c] [include/accel.h]
Added recognition of SHIFT, CONTROL and ALT keys to
TranslateAccelerator.
* [objects/metafile.c] [objects/font.c] [objects/bitblt.c]
A bit more metafile support.
Sun Jun 19 17:29:00 MET DST 1994 Erik Bos (erik@hacktic.nl)
* [loader/resource.c]
SizeofResource() and AllocResource() added, AccessResource() updated.
* [if1632/kernel.spec]
FreeLibrary() used for FreeModule().
* [windows/graphics.c]
Rectangle(): swap left & right corners when right < left,
swap top & bottom when botton < top.
Jun 19, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [controls/combo.c]
Fix bug in window style of the associated listbox.
* [controls/menu.c]
Skip separators in keyboard navigation by using new internal
functions SelectPrevItem() & SelectNextItem(),
* [misc/profile.c]
Bug fix in GetPrivateProfileInt(), was limited to 4 digit,
IntBuf must be alloc to (5+1)=6. char instead of 5.
* [misc/main.c]
Put code in functions SetEnvironment() & GetEnvironment().
* [misc/shell.c]
Start putting some code in ExtractIcon() function.
* [misc/mmsystem.c]
Some code for MMTimer functions & timers list.
* [miscemu/int31.c]
Few stubs for DPMI interrupt calls. Nothing work yet.
Mon Jun 20 07:37:43 EDT 1994 John Richardson (jrichard@cs.uml.edu)
* include/win.h (tagWND):
Added icon fields icon, hIcon and rectClientSave to
the tagWND struct.
* windows/Imakefile
Added icon.c to the list of files to compile
* windows/dce.c (GetDCEx):
Added some checks for iconic mode and pass icon window as drawable,
not the real window.
* windows/defwnd.c (DefWindowProc)
Added PAINTICON default windows procedure.
* windows/event.c (EVENT_Expose)
Added check for iconic window expose. If iconic window is exposed
send a WM_PAINTICON message
* windows/icon.c
New file. ICON_Iconify, ICON_findIconFromPoint, ICON_Deiconify.
* windows/mdi.c (DefMDIChildProc)
Test for IsIconic during a SC_RESTORE, this doesn't work yet.
* windows/message.c (hardware_event)
Looks for icon as well as window now.
* windows/nonclient.c (NC_HandleSysCommand, NC_DoNCPaintIcon)
Added iconify/deiconify in NC_HandleSysCommand, new function
NC_DoNCPaintIcon which paints an icon.
* windows/painting.c (BeginPaint)
Made a BeginPaint select the STOCK_BLACK_PEN, STOCK_WHITE_BRUSH,
and STOCK_SYSTEM_FONT objects since this is (hopefully) default
windows behavior.
* windows/win.h (CreateWindowEx)
Set the default background color of a window to be white.
Create icon window, turn off MINIMIZE if it is on, since
I don't know what to do with it as of yet... register
the icon with the hwnd of its window so we can identify where
icon messages are coming from.
Mon Jun 20 10:15:59 1994 Miguel de Icaza (miguel@sphinx)
* windows/event.c: Added a hack to define XPointer when using
X11R4.
* toolkit/hello.c: Test application for WineLib. To compile you'll
need: gcc -Iinclude -DWINELIB -g hello.c -c, and to link you'll
need: gcc hello.o libwine.a -lX11 -L/usr/openwin/lib -lm
* toolkit/heap.c: Extended the size of the block size per chunk.
* misc/stress.c (GetFreeFileHandles): Fixed typo.
* misc/main.c (main): Changes to allow compilation under SunOS.
* loader/library.c: Changed some ifdefs to compile WineLib.
----------------------------------------------------------------------
Tue Jun 14 08:09:14 1994 Bob Amstadt (bob@pooh)
......@@ -16,7 +149,7 @@ Fri Jun 10 07:56:49 1994 Bob Amstadt (bob@pooh)
* windows/event.c (SetCapture):
Set winHasCursor if mouse capture succeeds.
Jun 6, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
Jun 13, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [controls/listbox.c]
Fix bug in listbox : InsertString should call AddString if -1.
......
......@@ -78,9 +78,9 @@ LONG ComboBoxWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
0, 0, width - bm.bmHeight, bm.bmHeight,
hwnd, 1, wndPtr->hInstance, 0L);
lphc->hWndLBox = CreateWindow("LISTBOX", "",
WS_CHILD | WS_CLIPCHILDREN | WS_BORDER | WS_VSCROLL | LBS_NOTIFY,
wndPtr->rectClient.left, wndPtr->rectClient.top + bm.bmHeight,
width, height, wndPtr->hwndParent, 1,
WS_POPUP | WS_BORDER | WS_VSCROLL | LBS_NOTIFY,
rect.left, rect.top + bm.bmHeight,
width, height, wndPtr->hwndParent, 0,
wndPtr->hInstance, (LPSTR)MAKELONG(0, hwnd));
ShowWindow(lphc->hWndLBox, SW_HIDE);
#ifdef DEBUG_COMBO
......
This diff is collapsed.
......@@ -37,6 +37,8 @@ void MenuButtonUp(HWND hWnd, LPPOPUPMENU lppop, int x, int y);
void MenuMouseMove(HWND hWnd, LPPOPUPMENU lppop, WORD wParam, int x, int y);
void StdDrawPopupMenu(HWND hwnd);
void ResetHiliteFlags(LPPOPUPMENU lppop);
void SelectPrevItem(LPPOPUPMENU lppop);
void SelectNextItem(LPPOPUPMENU lppop);
BOOL ExecFocusedMenuItem(HWND hWnd, LPPOPUPMENU lppop);
void MenuItemSelect(HWND hWnd, LPPOPUPMENU lppop, WORD wIndex);
LPMENUITEM MenuFindItem(LPPOPUPMENU lppop, int x, int y, WORD *lpRet);
......@@ -60,6 +62,8 @@ BOOL FAR PASCAL AboutWine_Proc(HWND hDlg, WORD msg, WORD wParam, LONG lParam);
/***********************************************************************
* PopupMenuWndProc
SetWindow
SetWindow
*/
LONG PopupMenuWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
{
......@@ -90,6 +94,7 @@ LONG PopupMenuWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
#ifdef DEBUG_MENU
printf("PopupMenu End of WM_CREATE !\n");
#endif
ResetHiliteFlags(lppop);
return 0;
case WM_DESTROY:
lppop = PopupMenuGetWindowAndStorage(hwnd, &wndPtr);
......@@ -132,6 +137,7 @@ LONG PopupMenuWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
lppop = PopupMenuGetWindowAndStorage(hwnd, &wndPtr);
if (lppop == NULL) break;
if (wParam == 0 && lParam == 0L) {
ResetHiliteFlags(lppop);
HideAllSubPopupMenu(lppop);
#ifdef DEBUG_MENU
printf("PopupMenuWndProc hWnd=%04X WM_SHOWWINDOW -> HIDE!\n", hwnd);
......@@ -144,7 +150,7 @@ LONG PopupMenuWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
lppop->FocusedItem = (WORD)-1;
if (!lppop->BarFlag) {
PopupMenuCalcSize(hwnd);
ResetHiliteFlags(lppop);
/* ResetHiliteFlags(lppop); */
#ifdef DEBUG_MENU
printf("PopupMenuWndProc hWnd=%04X WM_SHOWWINDOW Width=%d Height=%d !\n",
hwnd, lppop->Width, lppop->Height);
......@@ -195,17 +201,11 @@ LONG PopupMenuWndProc( HWND hwnd, WORD message, WORD wParam, LONG lParam )
break;
case VK_UP:
if (lppop->BarFlag) break;
if (lppop->FocusedItem < 1) break;
MenuItemSelect(hwnd, lppop, lppop->FocusedItem - 1);
SelectPrevItem(lppop);
break;
case VK_DOWN:
if (lppop->BarFlag) goto ProceedSPACE;
if (lppop->FocusedItem == (WORD)-1) {
MenuItemSelect(hwnd, lppop, lppop->FocusedItem + 1);
break;
}
if (lppop->FocusedItem >= lppop->nItems - 1) break;
MenuItemSelect(hwnd, lppop, lppop->FocusedItem + 1);
SelectNextItem(lppop);
break;
case VK_LEFT:
if (lppop->SysFlag != 0) {
......@@ -564,6 +564,53 @@ void MenuMouseMove(HWND hWnd, LPPOPUPMENU lppop, WORD wParam, int x, int y)
}
void SelectPrevItem(LPPOPUPMENU lppop)
{
int nIndex;
LPMENUITEM lpitem;
if (lppop == NULL) return;
nIndex = lppop->FocusedItem;
if (nIndex < 1) {
if (nIndex == -1)
nIndex = 0;
else
nIndex = lppop->nItems - 1;
lpitem = GetMenuItemPtr(lppop, nIndex);
}
else {
nIndex--;
lpitem = GetMenuItemPtr(lppop, nIndex);
}
while (lpitem != NULL && lpitem->item_flags & MF_HILITE) {
nIndex--;
lpitem = GetMenuItemPtr(lppop, nIndex);
}
MenuItemSelect(lppop->hWnd, lppop, nIndex);
}
void SelectNextItem(LPPOPUPMENU lppop)
{
int nIndex;
LPMENUITEM lpitem;
if (lppop == NULL) return;
nIndex = lppop->FocusedItem;
if ((nIndex == -1) || (nIndex >= lppop->nItems - 1)) {
nIndex = 0;
lpitem = GetMenuItemPtr(lppop, nIndex);
}
else {
nIndex++;
lpitem = GetMenuItemPtr(lppop, nIndex);
}
while (lpitem != NULL && (lpitem->item_flags & MF_SEPARATOR)) {
nIndex++;
lpitem = GetMenuItemPtr(lppop, nIndex);
}
MenuItemSelect(lppop->hWnd, lppop, nIndex);
}
void ResetHiliteFlags(LPPOPUPMENU lppop)
{
LPMENUITEM lpitem;
......@@ -2162,7 +2209,8 @@ BOOL SetMenu(HWND hWnd, HMENU hMenu)
if (GetCapture() == hWnd) ReleaseCapture();
if (wndPtr->window != 0) {
flags = SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED;
if (!IsWindowVisible(hWnd)) flags |= SWP_NOREDRAW;
/* if (!IsWindowVisible(hWnd)) flags |= SWP_NOREDRAW; */
flags |= SWP_NOREDRAW;
if (hMenu == 0) {
wndPtr->wIDmenu = hMenu;
printf("SetMenu(%04X, %04X) // Menu removed, need NC recalc!\n", hWnd, hMenu);
......@@ -2241,7 +2289,7 @@ void DrawMenuBar(HWND hWnd)
int oldHeight;
oldHeight = lppop->Height;
hDC = GetWindowDC(hWnd);
StdDrawMenuBar(hDC, &lppop->rect, lppop, FALSE);
StdDrawMenuBar(hDC, &lppop->rect, lppop, TRUE);
ReleaseDC(hWnd, hDC);
if (oldHeight != lppop->Height) {
printf("DrawMenuBar // menubar changed oldHeight=%d != lppop->Height=%d\n",
......@@ -2251,6 +2299,8 @@ void DrawMenuBar(HWND hWnd)
wndPtr->rectClient.top += lppop->Height;
SendMessage(hWnd, WM_NCPAINT, 1, 0L);
}
else
StdDrawMenuBar(hDC, &lppop->rect, lppop, FALSE);
}
else
SendMessage(hWnd, WM_NCPAINT, 1, 0L);
......
......@@ -105,7 +105,7 @@ _CallToInit16:
movw $UDATASEL,%ax
movw %ax,%fs
movw %ax,%gs
/* movw %ds,%ax */
movw %ds,%ax
/*
* Call entry point
......
......@@ -44,7 +44,7 @@ length 415
#41 ENABLEDOS
#42 DISABLEDOS
45 pascal LoadModule(ptr ptr) LoadModule(1 2)
#46 FREEMODULE
46 pascal FreeModule(word) FreeLibrary(1)
47 pascal GetModuleHandle(ptr) GetModuleHandle(1)
48 pascal GetModuleUsage(word) GetModuleUsage(1)
49 pascal GetModuleFileName(word ptr s_word) GetModuleFileName(1 2 3)
......@@ -63,8 +63,8 @@ length 415
62 pascal LockResource(word) LockResource(1)
63 pascal FreeResource(word) FreeResource(1)
64 pascal AccessResource(word word) AccessResource(1 2)
#65 SIZEOFRESOURCE
#66 ALLOCRESOURCE
65 pascal SizeofResource(word word) SizeofResource(1 2)
66 pascal AllocResource(word word long) AllocResource(1 2 3)
#67 SETRESOURCEHANDLER
68 pascal InitAtomTable(word) InitAtomTable(1)
69 pascal FindAtom(ptr) FindAtom(1)
......
......@@ -82,6 +82,13 @@ length 1226
511 pascal WAVEINRESET(word) waveInReset(1)
512 pascal WAVEINGETPOSITION(word ptr word) waveInGetPosition(1 2 3)
513 pascal WAVEINGETID(word ptr) waveInGetID(1 2)
601 pascal timeGetSystemTime(ptr word) timeGetSystemTime(1 2)
602 pascal timeSetEvent(word word ptr long word) timeSetEvent(1 2 3 4 5)
603 pascal timeKillEvent(word) timeKillEvent(1)
604 pascal timeGetDevCaps(ptr word) timeGetDevCaps(1 2)
605 pascal timeBeginPeriod(word) timeBeginPeriod(1)
606 pascal timeEndPeriod(word) timeEndPeriod(1)
607 pascal timeGetTime() timeGetTime()
701 pascal MCISENDCOMMAND(word word long long) mciSendCommand(1 2 3 4)
702 pascal MCISENDSTRING(ptr ptr word word) mciSendString(1 2 3 4)
703 pascal MCIGETDEVICEID(ptr) mciSendCommand(1)
......
......@@ -19,4 +19,5 @@ typedef struct {
#define VIRTKEY_ACCEL 0x01
#define SHIFT_ACCEL 0x04
#define CONTROL_ACCEL 0x08
#define ALT_ACCEL 0x10
#define SYSTEM_ACCEL 0x80
......@@ -36,6 +36,7 @@ extern int HEAP_Free(MDESC **free_list, void *block);
extern void *HEAP_ReAlloc(MDESC **free_list, void *old_block,
int new_size, unsigned int flags);
extern LHEAP *HEAP_LocalFindHeap(unsigned short owner);
extern unsigned int HEAP_LocalSize(MDESC **free_list, unsigned int handle);
#define HEAP_OWNER (Segments[Stack16Frame[11] >> 3].owner)
#define LOCALHEAP() (&HEAP_LocalFindHeap(HEAP_OWNER)->free_list)
......
......@@ -41,8 +41,14 @@ BOOL MF_MetaParam8(DC *dc, short func, short param1, short param2,
BOOL MF_CreateBrushIndirect(DC *dc, HBRUSH hBrush, LOGBRUSH *logbrush);
BOOL MF_CreatePatternBrush(DC *dc, HBRUSH hBrush, LOGBRUSH *logbrush);
BOOL MF_CreatePenIndirect(DC *dc, HPEN hPen, LOGPEN *logpen);
BOOL MF_CreateFontIndirect(DC *dc, HFONT hFont, LOGFONT *logfont);
BOOL MF_TextOut(DC *dc, short x, short y, LPSTR str, short count);
BOOL MF_MetaPoly(DC *dc, short func, LPPOINT pt, short count);
BOOL MF_BitBlt(DC *dcDest, short xDest, short yDest, short width,
short height, HDC hdcSrc, short xSrc, short ySrc, DWORD rop);
BOOL MF_StretchBlt(DC *dcDest, short xDest, short yDest, short widthDest,
short heightDest, HDC hdcSrc, short xSrc, short ySrc,
short widthSrc, short heightSrc, DWORD rop);
#endif /* METAFILE_H */
......@@ -49,6 +49,9 @@ typedef struct tagWND
HANDLE hText; /* Handle of window text */
WORD flags; /* Misc. flags (see below) */
Window window; /* X window */
Window icon; /* icon's X window */
HICON hIcon; /* icon's MS-windows handle */
RECT rectClientSave; /* where client rect is saved when icon*/
HMENU hSysMenu; /* window's copy of System Menu */
HANDLE hProp; /* Handle of Properties List */
HTASK hTask; /* Task Handle of the owner */
......
......@@ -6,8 +6,6 @@ static char Copyright[] = "Copyright Martin Ayotte, 1994";
/*
#define DEBUG_MODULE
*/
#ifndef WINELIB
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......@@ -15,9 +13,9 @@ static char Copyright[] = "Copyright Martin Ayotte, 1994";
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "wine.h"
#include "prototypes.h"
#include "windows.h"
#include "wine.h"
#include "dlls.h"
#include "task.h"
#include "toolhelp.h"
......@@ -316,8 +314,6 @@ FARPROC GetProcAddress(HANDLE hModule, char *proc_name)
return (FARPROC) ret;
}
#endif /* ifndef WINELIB */
/* internal dlls */
static void
FillModStructBuiltIn(MODULEENTRY *lpModule, struct dll_name_table_entry_s *dll)
......@@ -412,3 +408,4 @@ HMODULE ModuleFindName(MODULEENTRY *lpModule, LPCSTR lpstrName)
{
return (ModuleFindHandle(lpModule, GetModuleHandle((char*)lpstrName)));
}
......@@ -92,6 +92,7 @@ GetFileInfo(unsigned short instance)
return w;
}
#ifndef WINELIB
/**********************************************************************
*
* Load MZ Header
......@@ -104,6 +105,7 @@ void load_mz_header(int fd, struct mz_header_s *mz_header)
myerror("Unable to read MZ header from file");
}
}
#endif
int IsDLLLoaded(char *name)
{
......@@ -233,7 +235,6 @@ HINSTANCE LoadImage(char *module, int filetype, int change_dir)
return 14;
}
#ifndef WINELIB
/**********************************************************************
* main
......@@ -395,4 +396,4 @@ void InitializeLoadedDLLs(struct w_files *wpnt)
for( ; wpnt != final_wpnt; wpnt = wpnt->next)
InitDLL(wpnt);
}
#endif
#endif /* #ifndef WINELIB */
......@@ -344,7 +344,7 @@ FindResourceByNumber(struct resource_nameinfo_s *result_p,
}
#ifdef DEBUG_RESOURCE
printf("FindResource: search type=%X id=%X // type=%X id=%X\n",
type_id, resource_id, typeinfo.type_id, type_id2);
type_id, resource_id, typeinfo.type_id, nameinfo.id);
#endif
if (nameinfo.id == resource_id) {
memcpy(result_p, &nameinfo, sizeof(nameinfo));
......@@ -478,6 +478,60 @@ FindResourceByName(struct resource_nameinfo_s *result_p,
}
/**********************************************************************
* GetRsrcCount [internal]
*/
int GetRsrcCount(HINSTANCE hInst, int type_id)
{
struct resource_typeinfo_s typeinfo;
struct resource_nameinfo_s nameinfo;
unsigned short size_shift;
/* off_t old_pos, new_pos;
unsigned char nbytes;
char name[256]; */
int i;
off_t rtoff;
if (hInst == 0) return 0;
#ifdef DEBUG_RESOURCE
printf("GetRsrcCount hInst=%04X typename=%08X\n", hInst, type_name);
#endif
if (OpenResourceFile(hInst) < 0) return 0;
/*
* Move to beginning of resource table.
*/
rtoff = (ResourceFileInfo->mz_header->ne_offset +
ResourceFileInfo->ne_header->resource_tab_offset);
lseek(ResourceFd, rtoff, SEEK_SET);
/*
* Read block size.
*/
if (read(ResourceFd, &size_shift, sizeof(size_shift)) != sizeof(size_shift)) {
printf("GetRsrcCount // bad block size !\n");
return -1;
}
size_shift = CONV_SHORT (size_shift);
for (;;) {
if (!load_typeinfo (ResourceFd, &typeinfo)) {
printf("GetRsrcCount // bad typeinfo size !\n");
return 0;
}
#ifdef DEBUG_RESOURCE
printf("GetRsrcCount // typeinfo.type_id=%X count=%d type_id=%X\n",
typeinfo.type_id, typeinfo.count, type_id);
#endif
if (typeinfo.type_id == 0) break;
if (type_match(type_id, typeinfo.type_id, ResourceFd, rtoff)) {
return typeinfo.count;
}
else {
lseek(ResourceFd, (typeinfo.count * sizeof(nameinfo)), SEEK_CUR);
}
}
return 0;
}
/**********************************************************************
* LoadIcon [USER.174]
*/
......@@ -685,12 +739,26 @@ int TranslateAccelerator(HWND hWnd, HANDLE hAccel, LPMSG msg)
#endif
lpAccelTbl = (LPACCELHEADER)GlobalLock(hAccel);
for (i = 0; i < lpAccelTbl->wCount; i++) {
/* if (lpAccelTbl->tbl[i].type & SHIFT_ACCEL) { */
/* if (lpAccelTbl->tbl[i].type & CONTROL_ACCEL) { */
if (lpAccelTbl->tbl[i].type & VIRTKEY_ACCEL) {
if (msg->wParam == lpAccelTbl->tbl[i].wEvent &&
msg->message == WM_KEYDOWN) {
if ((lpAccelTbl->tbl[i].type & SHIFT_ACCEL) &&
!(GetKeyState(VK_SHIFT) & 0xf)) {
GlobalUnlock(hAccel);
return 0;
}
if ((lpAccelTbl->tbl[i].type & CONTROL_ACCEL) &&
!(GetKeyState(VK_CONTROL) & 0xf)) {
GlobalUnlock(hAccel);
return 0;
}
if ((lpAccelTbl->tbl[i].type & ALT_ACCEL) &&
!(GetKeyState(VK_MENU) & 0xf)) {
GlobalUnlock(hAccel);
return 0;
}
SendMessage(hWnd, WM_COMMAND, lpAccelTbl->tbl[i].wIDval, 0x00010000L);
GlobalUnlock(hAccel);
return 1;
}
if (msg->message == WM_KEYUP) return 1;
......@@ -699,6 +767,7 @@ int TranslateAccelerator(HWND hWnd, HANDLE hAccel, LPMSG msg)
if (msg->wParam == lpAccelTbl->tbl[i].wEvent &&
msg->message == WM_CHAR) {
SendMessage(hWnd, WM_COMMAND, lpAccelTbl->tbl[i].wIDval, 0x00010000L);
GlobalUnlock(hAccel);
return 1;
}
}
......@@ -773,6 +842,8 @@ HANDLE FindResource(HANDLE instance, LPSTR resource_name, LPSTR type_name)
if (r->size_shift == -1)
{
printf("FindResource hInst=%04X typename=%08X resname=%08X not found!\n",
instance, type_name, resource_name);
GlobalFree(rh);
return 0;
}
......@@ -780,6 +851,36 @@ HANDLE FindResource(HANDLE instance, LPSTR resource_name, LPSTR type_name)
return rh;
}
/**********************************************************************
* AllocResource [KERNEL.66]
*/
HANDLE AllocResource(HANDLE instance, HANDLE hResInfo, DWORD dwSize)
{
RESOURCE *r;
int image_size;
if (instance == 0)
return 0;
if (OpenResourceFile(instance) < 0)
return 0;
r = (RESOURCE *)GlobalLock(hResInfo);
if (r == NULL)
return 0;
image_size = r->nameinfo.length << r->size_shift;
if (dwSize == 0)
r->rsc_mem = GlobalAlloc(GMEM_MOVEABLE, image_size);
else
r->rsc_mem = GlobalAlloc(GMEM_MOVEABLE, dwSize);
GlobalUnlock(hResInfo);
return r->rsc_mem;
}
/**********************************************************************
* LoadResource [KERNEL.61]
*/
......@@ -851,24 +952,62 @@ HANDLE FreeResource(HANDLE hResData)
return hResData;
}
/**********************************************************************
* AccessResource [KERNEL.64]
*/
int AccessResource(HANDLE instance, HANDLE hResInfo)
{
int resfile;
#ifdef DEBUG_RESOURCE
int resfile, image_size;
RESOURCE *r;
/* #ifdef DEBUG_RESOURCE */
printf("AccessResource(%04X, %04X);\n", instance, hResInfo);
#endif
/*
resfile = OpenResourceFile(instance);
/* #endif */
if (instance == 0)
return -1;
if ((resfile = OpenResourceFile(instance)) < 0)
return -1;
if ((r = (RESOURCE *)GlobalLock(hResInfo)) == NULL)
return -1;
lseek(resfile, ((int) r->nameinfo.offset << r->size_shift), SEEK_SET);
GlobalUnlock(hResInfo);
return resfile;
*/
return - 1;
}
/**********************************************************************
* SizeofResource [KERNEL.65]
*/
WORD SizeofResource(HANDLE instance, HANDLE hResInfo)
{
int image_size;
RESOURCE *r;
/* #ifdef DEBUG_RESOURCE */
printf("SizeofResource(%04X, %04X);\n", instance, hResInfo);
/* #endif */
if (instance == 0)
return 0;
if ((r = (RESOURCE *)GlobalLock(hResInfo)) == NULL)
return 0;
image_size = r->nameinfo.length << r->size_shift;
GlobalUnlock(hResInfo);
/* #ifdef DEBUG_RESOURCE */
printf("SizeofResource return %d\n", image_size);
/* #endif */
return image_size;
}
/**********************************************************************
* RSC_LoadResource
......
......@@ -195,13 +195,14 @@ HEAP_ReAlloc(MDESC **free_list, void *old_block,
m_free->next->prev = m_free->prev;
m->length += sizeof(MDESC) + m_free->length;
#ifdef DEBUG_HEAP
printf("HEAP_ReAlloc before GLOBAL_FLAGS_ZEROINIT !\n");
#endif
if (flags & GLOBAL_FLAGS_ZEROINIT)
memset(m_free, '\0', sizeof(MDESC) + m_free->length);
}
/*
* Check for shrink block.
*/
......@@ -399,6 +400,22 @@ HEAP_LocalInit(unsigned short owner, void *start, int length)
LocalHeaps = lh;
}
/**********************************************************************
* HEAP_LocalSize
*/
unsigned int
HEAP_LocalSize(MDESC **free_list, unsigned int handle)
{
MDESC *m;
m = (MDESC *) (((int) *free_list & 0xffff0000) |
(handle & 0xffff)) - 1;
if (m->next != m || m->prev != m)
return 0;
return m->length;
}
/**********************************************************************
* WIN16_LocalAlloc
*/
......
......@@ -22,7 +22,16 @@ static char Copyright[] = "Copyright Alexandre Julliard, 1994";
#define WINE_CLASS "Wine" /* Class name for resources */
LPSTR lpEnvList;
typedef struct tagENVENTRY {
LPSTR Name;
LPSTR Value;
WORD wSize;
struct tagENVENTRY *Prev;
struct tagENVENTRY *Next;
} ENVENTRY;
typedef ENVENTRY *LPENVENTRY;
LPENVENTRY lpEnvList = NULL;
Display * XT_display; /* To be removed */
......@@ -400,9 +409,10 @@ int main( int argc, char *argv[] )
MAIN_SaveSetup();
DOS_InitFS();
Comm_Init();
#ifndef WINELIB
INT21_Init();
#ifndef sunos
#endif
#ifndef sparc
atexit(called_at_exit);
#else
on_exit (called_at_exit, 0);
......@@ -442,9 +452,66 @@ LONG GetWinFlags(void)
*/
int SetEnvironment(LPSTR lpPortName, LPSTR lpEnviron, WORD nCount)
{
printf("EMPTY STUB ! // SetEnvironnement('%s', '%s', %d) !\n",
lpPortName, lpEnviron, nCount);
return 0;
LPENVENTRY lpNewEnv;
LPENVENTRY lpEnv = lpEnvList;
printf("SetEnvironnement('%s', '%s', %d) !\n",
lpPortName, lpEnviron, nCount);
if (lpPortName == NULL) return -1;
while (lpEnv != NULL) {
if (lpEnv->Name != NULL && strcmp(lpEnv->Name, lpPortName) == 0) {
if (nCount == 0 || lpEnviron == NULL) {
if (lpEnv->Prev != NULL) lpEnv->Prev->Next = lpEnv->Next;
if (lpEnv->Next != NULL) lpEnv->Next->Prev = lpEnv->Prev;
free(lpEnv->Value);
free(lpEnv->Name);
free(lpEnv);
printf("SetEnvironnement() // entry deleted !\n");
return -1;
}
free(lpEnv->Value);
lpEnv->Value = malloc(nCount);
if (lpNewEnv->Value == NULL) {
printf("SetEnvironment() // Error allocating entry value !\n");
return 0;
}
memcpy(lpEnv->Value, lpEnviron, nCount);
lpEnv->wSize = nCount;
printf("SetEnvironnement() // entry modified !\n");
return nCount;
}
if (lpEnv->Next == NULL) break;
lpEnv = lpEnv->Next;
}
if (nCount == 0 || lpEnviron == NULL) return -1;
printf("SetEnvironnement() // new entry !\n");
lpNewEnv = malloc(sizeof(ENVENTRY));
if (lpNewEnv == NULL) {
printf("SetEnvironment() // Error allocating new entry !\n");
return 0;
}
if (lpEnvList == NULL) {
lpEnvList = lpNewEnv;
lpNewEnv->Prev = NULL;
}
else {
lpEnv->Next = lpNewEnv;
lpNewEnv->Prev = lpEnv;
}
lpNewEnv->Next = NULL;
lpNewEnv->Name = malloc(strlen(lpPortName) + 1);
if (lpNewEnv->Name == NULL) {
printf("SetEnvironment() // Error allocating entry name !\n");
return 0;
}
strcpy(lpNewEnv->Name, lpPortName);
lpNewEnv->Value = malloc(nCount);
if (lpNewEnv->Value == NULL) {
printf("SetEnvironment() // Error allocating entry value !\n");
return 0;
}
memcpy(lpNewEnv->Value, lpEnviron, nCount);
lpNewEnv->wSize = nCount;
return nCount;
}
/***********************************************************************
......@@ -452,8 +519,20 @@ int SetEnvironment(LPSTR lpPortName, LPSTR lpEnviron, WORD nCount)
*/
int GetEnvironment(LPSTR lpPortName, LPSTR lpEnviron, WORD nMaxSiz)
{
printf("EMPTY STUB ! // GetEnvironnement('%s', '%s', %d) !\n",
lpPortName, lpEnviron, nMaxSiz);
WORD nCount;
LPENVENTRY lpEnv = lpEnvList;
printf("GetEnvironnement('%s', '%s', %d) !\n",
lpPortName, lpEnviron, nMaxSiz);
while (lpEnv != NULL) {
if (lpEnv->Name != NULL && strcmp(lpEnv->Name, lpPortName) == 0) {
nCount = min(nMaxSiz, lpEnv->wSize);
memcpy(lpEnviron, lpEnv->Value, nCount);
printf("GetEnvironnement() // found '%s' !\n", lpEnviron);
return nCount;
}
lpEnv = lpEnv->Next;
}
printf("GetEnvironnement() // not found !\n");
return 0;
}
......
......@@ -12,7 +12,24 @@ static char Copyright[] = "Copyright Martin Ayotte, 1993";
#include "mmsystem.h"
static WORD mciActiveDev = 0;
static BOOL mmTimeStarted = FALSE;
static MMTIME mmSysTimeMS;
static MMTIME mmSysTimeSMPTE;
typedef struct tagTIMERENTRY {
WORD wDelay;
WORD wResol;
FARPROC lpFunc;
DWORD dwUser;
WORD wFlags;
WORD wTimerID;
WORD wCurTime;
struct tagTIMERENTRY *Next;
struct tagTIMERENTRY *Prev;
} TIMERENTRY;
typedef TIMERENTRY *LPTIMERENTRY;
static LPTIMERENTRY lpTimerList = NULL;
UINT WINAPI midiGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
UINT WINAPI waveGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
......@@ -1451,6 +1468,160 @@ DWORD WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage,
}
/**************************************************************************
* MMSysTimeCallback [internal]
*/
WORD FAR PASCAL MMSysTimeCallback(HWND hWnd, WORD wMsg, int nID, DWORD dwTime)
{
LPTIMERENTRY lpTimer = lpTimerList;
mmSysTimeMS.u.ms += 33;
mmSysTimeSMPTE.u.smpte.frame++;
while (lpTimer != NULL) {
lpTimer->wCurTime--;
if (lpTimer->wCurTime == 0) {
lpTimer->wCurTime = lpTimer->wDelay;
if (lpTimer->lpFunc != NULL) {
#ifdef WINELIB
(*lpTimer->lpFunc)(lpTimer->wTimerID, (WORD)0,
lpTimer->dwUser, (DWORD)0, (DWORD)0);
#else
CallBack16(lpTimer->lpFunc, 5,
0, (int)lpTimer->wTimerID, 0, (int)0,
2, lpTimer->dwUser, 2, 0, 2, 0);
#endif
}
if (lpTimer->wFlags & TIME_ONESHOT)
timeKillEvent(lpTimer->wTimerID);
}
lpTimer = lpTimer->Next;
}
}
/**************************************************************************
* StartMMTime [internal]
*/
void StartMMTime()
{
if (!mmTimeStarted) {
mmTimeStarted = TRUE;
mmSysTimeMS.wType = TIME_MS;
mmSysTimeMS.u.ms = 0;
mmSysTimeSMPTE.wType = TIME_SMPTE;
mmSysTimeSMPTE.u.smpte.hour = 0;
mmSysTimeSMPTE.u.smpte.min = 0;
mmSysTimeSMPTE.u.smpte.sec = 0;
mmSysTimeSMPTE.u.smpte.frame = 0;
mmSysTimeSMPTE.u.smpte.fps = 0;
mmSysTimeSMPTE.u.smpte.dummy = 0;
SetTimer(0, 1, 33, (FARPROC)MMSysTimeCallback);
}
}
/**************************************************************************
* timeGetSystemTime [MMSYSTEM.601]
*/
WORD timeGetSystemTime(LPMMTIME lpTime, WORD wSize)
{
printf("timeGetSystemTime(%08X, %u);\n", lpTime, wSize);
if (!mmTimeStarted) StartMMTime();
return 0;
}
/**************************************************************************
* timeSetEvent [MMSYSTEM.602]
*/
WORD timeSetEvent(WORD wDelay, WORD wResol,
LPTIMECALLBACK lpFunc,
DWORD dwUser, WORD wFlags)
{
WORD wNewID = 0;
LPTIMERENTRY lpNewTimer;
LPTIMERENTRY lpTimer = lpTimerList;
printf("timeSetEvent(%u, %u, %08X, %08X, %04X);\n",
wDelay, wResol, lpFunc, dwUser, wFlags);
if (!mmTimeStarted) StartMMTime();
lpNewTimer = malloc(sizeof(TIMERENTRY));
if (lpNewTimer == NULL) return 0;
while (lpTimer != NULL) {
wNewID = max(wNewID, lpTimer->wTimerID);
if (lpTimer->Next == NULL) break;
lpTimer = lpTimer->Next;
}
if (lpTimerList == NULL) {
lpTimerList = lpNewTimer;
lpNewTimer->Prev == NULL;
}
else {
lpTimer->Next == lpNewTimer;
lpNewTimer->Prev == lpTimer;
}
lpNewTimer->Next == NULL;
lpNewTimer->wTimerID = wNewID + 1;
lpNewTimer->wCurTime = wDelay;
lpNewTimer->wDelay = wDelay;
lpNewTimer->wResol = wResol;
lpNewTimer->lpFunc = lpFunc;
lpNewTimer->dwUser = dwUser;
lpNewTimer->wFlags = wFlags;
return lpNewTimer->wTimerID;
}
/**************************************************************************
* timeKillEvent [MMSYSTEM.603]
*/
WORD timeKillEvent(WORD wID)
{
LPTIMERENTRY lpTimer = lpTimerList;
while (lpTimer != NULL) {
if (wID == lpTimer->wTimerID) {
if (lpTimer->Prev != NULL) lpTimer->Prev->Next = lpTimer->Next;
if (lpTimer->Next != NULL) lpTimer->Next->Prev = lpTimer->Prev;
free(lpTimer);
return TRUE;
}
lpTimer = lpTimer->Next;
}
return 0;
}
/**************************************************************************
* timeGetDevCaps [MMSYSTEM.604]
*/
WORD timeGetDevCaps(LPTIMECAPS lpCaps, WORD wSize)
{
printf("timeGetDevCaps(%08X, %u) !\n", lpCaps, wSize);
return 0;
}
/**************************************************************************
* timeBeginPeriod [MMSYSTEM.605]
*/
WORD timeBeginPeriod(WORD wPeriod)
{
printf("timeBeginPeriod(%u) !\n", wPeriod);
if (!mmTimeStarted) StartMMTime();
return 0;
}
/**************************************************************************
* timeEndPeriod [MMSYSTEM.606]
*/
WORD timeEndPeriod(WORD wPeriod)
{
printf("timeEndPeriod(%u) !\n", wPeriod);
return 0;
}
/**************************************************************************
* timeGetTime [MMSYSTEM.607]
*/
DWORD timeGetTime()
{
printf("timeGetTime(); !\n");
if (!mmTimeStarted) StartMMTime();
return 0;
}
/**************************************************************************
* mmioOpen [MMSYSTEM.1210]
......
......@@ -332,13 +332,13 @@ int GetProfileString (LPSTR AppName, LPSTR KeyName, LPSTR Default,
WORD GetPrivateProfileInt (LPSTR AppName, LPSTR KeyName, short Default,
LPSTR File)
{
static char IntBuf [5];
static char buf [5];
static char IntBuf [6];
static char buf [6];
sprintf (buf, "%d", Default);
/* Check the exact semantic with the SDK */
GetPrivateProfileString (AppName, KeyName, buf, IntBuf, 5, File);
GetPrivateProfileString (AppName, KeyName, buf, IntBuf, 6, File);
if (!strcasecmp (IntBuf, "true"))
return 1;
if (!strcasecmp (IntBuf, "yes"))
......
......@@ -3,7 +3,9 @@
*/
static char Copyright[] = "Copyright Martin Ayotte, 1994";
/*
#define DEBUG_PROP
*/
#include <stdlib.h>
#include <stdio.h>
......@@ -13,12 +15,12 @@ static char Copyright[] = "Copyright Martin Ayotte, 1994";
#include "heap.h"
#include "win.h"
typedef struct {
typedef struct tagPROPENTRY {
LPSTR PropName;
WORD Atom;
HANDLE hData;
void *lpPrevProp;
void *lpNextProp;
struct tagPROPENTRY *lpPrevProp;
struct tagPROPENTRY *lpNextProp;
} PROPENTRY;
typedef PROPENTRY *LPPROPENTRY;
......@@ -44,7 +46,9 @@ HANDLE RemoveProp(HWND hWnd, LPSTR lpStr)
}
lpProp = (LPPROPENTRY) GlobalLock(wndPtr->hProp);
if (lpProp == NULL) {
#ifdef DEBUG_PROP
printf("Property List Empty !\n");
#endif
return 0;
}
while (TRUE) {
......@@ -53,14 +57,14 @@ HANDLE RemoveProp(HWND hWnd, LPSTR lpStr)
(((DWORD)lpStr & 0xFFFF0000) != 0L &&
lpProp->PropName != NULL &&
strcmp(lpProp->PropName, lpStr) == 0)) {
#ifdef DEBUG_PROP
printf("RemoveProp // Property found ! hData=%04X\n", lpProp->hData);
#endif
hOldData = lpProp->hData;
if (lpProp->lpPrevProp != NULL)
((LPPROPENTRY)lpProp->lpPrevProp)->lpNextProp =
lpProp->lpNextProp;
lpProp->lpPrevProp->lpNextProp = lpProp->lpNextProp;
if (lpProp->lpNextProp != NULL)
((LPPROPENTRY)lpProp->lpNextProp)->lpPrevProp =
lpProp->lpPrevProp;
lpProp->lpNextProp->lpPrevProp = lpProp->lpPrevProp;
if (lpProp->PropName != NULL) free(lpProp->PropName);
GlobalFree(lpProp);
GlobalUnlock(wndPtr->hProp);
......@@ -70,7 +74,9 @@ HANDLE RemoveProp(HWND hWnd, LPSTR lpStr)
lpProp = lpProp->lpNextProp;
}
GlobalUnlock(wndPtr->hProp);
#ifdef DEBUG_PROP
printf("RemoveProp // Property not found !\n");
#endif
return 0;
}
......@@ -95,7 +101,9 @@ HANDLE GetProp(HWND hWnd, LPSTR lpStr)
}
lpProp = (LPPROPENTRY) GlobalLock(wndPtr->hProp);
if (lpProp == NULL) {
#ifdef DEBUG_PROP
printf("Property List Empty !\n");
#endif
return 0;
}
while (TRUE) {
......@@ -104,14 +112,18 @@ HANDLE GetProp(HWND hWnd, LPSTR lpStr)
(((DWORD)lpStr & 0xFFFF0000) != 0L &&
lpProp->PropName != NULL &&
strcmp(lpProp->PropName, lpStr) == 0)) {
#ifdef DEBUG_PROP
printf("GetProp // Property found ! hData=%04X\n", lpProp->hData);
#endif
GlobalUnlock(wndPtr->hProp);
return lpProp->hData;
}
if (lpProp->lpNextProp == NULL) break;
lpProp = lpProp->lpNextProp;
}
#ifdef DEBUG_PROP
printf("GetProp // Property not found !\n");
#endif
GlobalUnlock(wndPtr->hProp);
return 0;
}
......
......@@ -5,6 +5,7 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "prototypes.h"
#include "windows.h"
#include "shell.h"
......@@ -396,8 +397,23 @@ INT AboutDlgProc(HWND hWnd, WORD msg, WORD wParam, LONG lParam)
*/
HICON ExtractIcon(HINSTANCE hInst, LPCSTR lpszExeFileName, UINT nIconIndex)
{
fprintf(stderr, "ExtractIcon : Empty Stub !!!\n");
int count;
HICON hIcon = 0;
HINSTANCE hInst2 = hInst;
fprintf(stderr, "ExtractIcon(%04X, '%s', %d\n",
hInst, lpszExeFileName, nIconIndex);
if (lpszExeFileName != NULL) {
hInst2 = LoadLibrary(lpszExeFileName);
}
if (hInst2 != 0 && nIconIndex == (UINT)-1) {
count = GetRsrcCount(hInst2, NE_RSCTYPE_GROUP_ICON);
printf("ExtractIcon // '%s' has %d icons !\n", lpszExeFileName, count);
return (HICON)count;
}
if (hInst2 != hInst && hInst2 != 0) {
FreeLibrary(hInst2);
}
return hIcon;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment