hello,
im developing a personal purposes application, that will hook the NSS API!
i tried to hook PR_Write in the following way:
#include "gecko-sdk1.8/include/prio.h"
#pragma comment (lib, "gecko-sdk1.8/lib/nspr4.lib")
typedef NSPR_API(PRInt32) (*PR_Write) (PRFileDesc *fd,const void
*buf,PRInt32 amount);
PR_Write
PRWRITE;
PRInt32 cPR_Write(
PRFileDesc *fd,
const void *buf,
PRInt32 amount)
{
HMODULE nspr4_dll = GetModuleHandle("nspr4.dll");
if (nspr4_dll) PRWRITE = (PR_Write) GetProcAddress(nspr4_dll, "PR_Write");
WriteLog("PR_Write Called %d - %s", amount, buf);
PRInt32 hResult = (PRInt32) PRWRITE(fd, buf, amount);
return hResult;
}
once the api is hooked and patched, i get firefox to crash.
i could get something like this
firefox.exe:PR_Write Called 474 -
({windows:[{tabs:[{entries:[{ur...............
then the browser crashes! dunno why, and what is wrong, do you have any
idea? i need help
Thanks in advance.
_______________________________________________
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto