determining identity of AppleEvents client

determining identity of AppleEvents client

Post by Michael Kier » Sat, 12 Jun 1999 04:00:00



Is there a way to determine the identity of a client program/process
that sends an AppleEvent?  e.g.  Could I determine the source of a "quit"
command received by my program?  I may be missing something obvious, but
I've been looking for something like this.

Thanks for any info.

-- Michael Kieras -------------------------------------------------

 
 
 

determining identity of AppleEvents client

Post by John » Mon, 14 Jun 1999 04:00:00




> Is there a way to determine the identity of a client program/process
> that sends an AppleEvent?  e.g.  Could I determine the source of a "quit"
> command received by my program?  I may be missing something obvious, but
> I've been looking for something like this.

> Thanks for any info.

> -- Michael Kieras -------------------------------------------------


I believe you use AEGetAttributePtr to extract the keyAddressAttr
attribute of the Apple event you receive.

You should be able to find details in Inside Macintosh: Interapplication
Communication.

Hth,

John

 
 
 

1. Determining file identity

Peter,

answer for your question is:

BOOL GetFileInformationByHandle(
    HANDLE hFile,       // handle of file
    LPBY_HANDLE_FILE_INFORMATION lpFileInformation      // address of structure

   );  

Parameters
hFile
Handle to the file that you want to obtain information about.
This handle should not be a pipe handle. The GetFileInformationByHandle
function does not work with pipe handles.
lpFileInformation
Points to a BY_HANDLE_FILE_INFORMATION structure that receives the file
information. The structure can be used in subsequent calls to
GetFileInformationByHandle to refer to the information about the file.

where,

typedef struct _BY_HANDLE_FILE_INFORMATION { // bhfi  
    DWORD    dwFileAttributes;
    FILETIME ftCreationTime;
    FILETIME ftLastAccessTime;
    FILETIME ftLastWriteTime;
    DWORD    dwVolumeSerialNumber;
    DWORD    nFileSizeHigh;
    DWORD    nFileSizeLow;
    DWORD    nNumberOfLinks;
    DWORD    nFileIndexHigh;
    DWORD    nFileIndexLow;

.....
.....
.....

nFileIndexHigh
Specifies the high-order word of a unique identifier associated with the
file.
nFileIndexLow
Specifies the low-order word of a unique identifier associated with the
file. This identifier and the volume serial number uniquely identify a
file. This number may change when the system is restarted or when the file
is opened. After a process opens a file, the identifier is constant until
the file is closed. An application can use this identifier and the volume
serial number to determine whether two handles refer to the same file.

--
(USB Zealot)
Ranjit Bhalerao

2. Midi's

3. RTTI, typeid and determining class identity

4. Applescript for Palm Desktop to Netscape Messenger?

5. Q: RPC CLient - physical identity.

6. How to Install dbiproxy on WIN2000

7. How to determine the session is a terminal client

8. How To Stop Suicide Terrorists... __`_ ipawduto

9. determine client OS from server side

10. Determining the client process making a remote call

11. how to determine client's browser & os ????

12. Determine if the window client area is obscured

13. Determine Local Port Client Application is Listening On.