Forum: Win32/Win64 API (native code)
by UliBru,
19. Jun 2017
Danke.
var
aSA: TSecurityAttributes;
aSD: TSecurityDescriptor;
begin
InitializeSecurityDescriptor(@aSD, SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl(@aSD, True, nil, False);
aSA.nLength := SizeOf(TSecurityAttributes);
aSA.bInheritHandle := true;
aSa.lpSecurityDescriptor := @aSD;
Forum: Win32/Win64 API (native code)
by UliBru,
19. Jun 2017
Ich verwende bisher u.a. den Aufruf
hmmfApplicationName := CreateFileMapping(INVALID_HANDLE_VALUE, nil, PAGE_READWRITE, 0, SizeOf(TmmfApplicationName), PChar('AppNameXYZ'));
Vermutlich liegt das Problem daran, dass der zweite Parameter nil ist.
Dass also anstelle von nil ein passender Pointer auf SecurityAttributes übergeben werden muss, so dass jedes andere Programm auf das memory...