CMM: Fix broken notify() function and wrong parameter in Clipboard::ResetBlockingBuffer()

git-svn-id: svn://kolibrios.org@6562 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2016-10-04 22:44:07 +00:00
parent a84ffe3f8d
commit b779d29caa
2 changed files with 20 additions and 9 deletions

View File

@ -11,12 +11,12 @@ struct buffer_data
dword size; dword size;
dword type; dword type;
dword encoding; dword encoding;
byte buffer_data[4096]; dword content;
}; };
struct Clipboard { struct Clipboard {
buffer_data data; buffer_data slot_data;
dword GetSlotCount(); dword GetSlotCount();
dword GetSlotData( ECX); dword GetSlotData( ECX);
dword SetSlotData( EDX, ESI); dword SetSlotData( EDX, ESI);
@ -31,11 +31,22 @@ dword Clipboard::GetSlotCount()
$int 0x40 $int 0x40
} }
#define SLOT_DATA_TYPE_TEXT 0
#define SLOT_DATA_TYPE_IMAGE 1
#define SLOT_DATA_TYPE_RAW 2
#define SLOT_DATA_TYPE_RESERVED 3
dword Clipboard::GetSlotData( ECX) //ECX = slot number dword Clipboard::GetSlotData( ECX) //ECX = slot number
{ {
dword result;
$mov eax, 54 $mov eax, 54
$mov ebx, 1 $mov ebx, 1
$int 0x40 $int 0x40
result = EAX;
slot_data.size = DSDWORD[result];
slot_data.type = DSDWORD[result+4];
slot_data.encoding = DSDWORD[result+8];
if (slot_data.type == SLOT_DATA_TYPE_TEXT) slot_data.content = result+12;
else slot_data.content = result+10;
} }
dword Clipboard::SetSlotData( ECX, EDX) //ECX = data size, EDX - pointer to data dword Clipboard::SetSlotData( ECX, EDX) //ECX = data size, EDX - pointer to data
@ -55,7 +66,7 @@ dword Clipboard::DelLastSlot()
dword Clipboard::ResetBlockingBuffer() dword Clipboard::ResetBlockingBuffer()
{ {
$mov eax, 54 $mov eax, 54
$mov ebx, 3 $mov ebx, 4
$int 0x40 $int 0x40
} }

View File

@ -247,12 +247,12 @@ inline fastcall ExitProcess()
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
inline fastcall void SetCurDir( ECX) // inline fastcall void SetCurDir( ECX)
{ // {
EAX=30; // EAX=30;
EBX=1; // EBX=1;
$int 0x40 // $int 0x40
} // }
//eax = ÿçûê ñèñòåìû (1=eng, 2=fi, 3=ger, 4=rus) //eax = ÿçûê ñèñòåìû (1=eng, 2=fi, 3=ger, 4=rus)