[Selfext-user] Protection of SFX
Brought to you by:
mweth
|
From: Ho K. L. <ywc...@ho...> - 2003-09-12 09:39:13
|
<html><div style='background-color:'><DIV>Hello,</DIV>
<DIV> </DIV>
<DIV>I would like to protect my SFX from being able to be opened by other archivers like WinZip. I want to do it simply by removing the first 4 bytes ("MSCF") from the cabinet, then in file_read(), add the 4 bytes to the buffer temporarily. I have tried to do this .. but seems it only retrieves the header information, but NOT extracting the files inside.</DIV>
<DIV> </DIV>
<DIV>FNREAD(file_read)<BR>{ <BR> DWORD rslt;<BR> if(SetFilePointer(GetHandle(hf), 0, 0, FILE_CURRENT)==g_iExeSize+8)<BR> {<BR> char* cTmp = (char*) pv;<BR> lstrcpy(cTmp, "MSCF");<BR> ReadFile(GetHandle(hf), &cTmp[4], cb-4, &rslt, NULL); <BR> return (rslt+4);<BR> } else<BR> {<BR> ReadFile(GetHandle(hf), pv, cb, &rslt, NULL); <BR> return rslt; <BR> }<BR>}<BR></DIV>
<DIV>What's wrong? Can somebody please help me?</DIV>
<DIV> </DIV>
<DIV>Kei</DIV>
<DIV> </DIV></div><br clear=all><hr>Tired of spam? Get <a href="http://g.msn.com/8HMGEN/2734??PS=">advanced junk mail protection</a> with MSN 8.</html>
|