Using OracleMonitor Unit crashes Program at startup

HolgerS

Member
Hi,
We've encountered this problem on 2 customer Pc's after they installed a security update for Windows:
(Windows 2000 Service Pack 4 build 2195)

Stack Trace:

OracleMonitor MonitorClient.Destroy
OracleMonitorIntf Error
OracleMonitorIntf TEvent.Create
OracleMonitorIntf MonitorThread.Create
OracleMonitor MonitorClient.Create
OracleMonitor initialization
System InitUnits

Whats happening:
Initialization of OracleMonitor:
Unable to create the Event in TEvent.Create, procedure "Error" is called.

The the TMonitorClientDestroy is called which tries to do
" FMonitorEvent.EventData.Status := msAvailable;"
but FMonitorEvent is nil because the Event is not created.

madExcept shows an Acess Violation Error, without madexcept the Application just don't start.

Any idea why the "CreateEvent" isn't working ?

regards
Holger

:confused:
 
Which Direct Oracle Access version are you using? We have made some changes to the event security attributes in 4.0.
 
Hi Marco,
I hope we are using 4.0.6,

I've copied this code from the Doa unit:

PSA := @SecurityAttributes;
PSD := @SecurityDescriptor;
with PSA^ do
begin
nLength := SizeOf(TSecurityAttributes);
lpSecurityDescriptor := PSD;
bInheritHandle := True;
end;
InitializeSecurityDescriptor(PSD, 1 {SECURITY_DESCRIPTOR_REVISION});
SetSecurityDescriptorDacl(PSD, True, nil, False);

is this from Version 4 ?
 
Yes, this is the code that sets up the security descriptor for the CreateEvent function.

Can you modify the TEvent.Create function and call GetLastError after the call to CreateEvent? Log the GetLastError return value and let me know what it is.
 
No news really. Apparently the user under which the Oracle Monitor is running is not authorized to create an event.
 
Back
Top