PDA

View Full Version : VB developpement



ncornu
06-20-2003, 12:35 PM
Hello,

i would like to make a program in VB that can read in EQ memory.
I translated your source code to VB but one function is hard to translate i have no idea how i can code this:

bool AdjustDacl(HANDLE h, DWORD DesiredAccess)
{
// the WORLD Sid is trivial to form programmatically (S-1-1-0)
SID world = { SID_REVISION, 1, SECURITY_WORLD_SID_AUTHORITY, 0 };

EXPLICIT_ACCESS ea = {
DesiredAccess,
SET_ACCESS,
NO_INHERITANCE,
{
0, NO_MULTIPLE_TRUSTEE,
TRUSTEE_IS_SID,
TRUSTEE_IS_USER,
reinterpret_cast<LPTSTR>(&world)
}
};
ACL* pdacl = 0;
DWORD err = SetEntriesInAcl(1, &ea, 0, &pdacl);
if (err == ERROR_SUCCESS)
{
err = SetSecurityInfo(h, SE_KERNEL_OBJECT, DACL_SECURITY_INFORMATION, 0, 0, pdacl, 0);
LocalFree(pdacl);
return(err == ERROR_SUCCESS);
}
else
return(FALSE);


What is the SID structure ?


hProcess = OpenProcess (PROCESS_VM_READ, FALSE, pe32.th32ProcessID);
if (hProcess == NULL)
{
HANDLE hpWriteDAC = OpenProcess(WRITE_DAC, FALSE, pe32.th32ProcessID);
if (hpWriteDAC == NULL)


OpenProcess (PROCESS_VM_READ return error 5, OpenProcess(WRITE_DAC... return 0 but i can't code AdjustDacl function.

It will be great for me if i can make this program.

Thanks in advance CB

NC

ncornu
06-22-2003, 02:45 AM
I stopped VB developpement. I use your C++ source and i made the prgram i wanted.

I use VC debugger to find the data i want in eq memory. If someone know another utility let me know.

NC

cavemanbob
06-22-2003, 11:56 AM
Well, it doesn't affect you now I guess, but this line:
SID world = { SID_REVISION, 1, SECURITY_WORLD_SID_AUTHORITY, 0 };
Just makes an array with 4 elements set to whatever those values correspond to.