WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

System UDFs

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Check for Docking Station Present


;CMAPI
;CONFIGRET
;WINAPI
;CM_Is_Dock_Station_Present(
;OUT PBOOL pbPresent,
;);
;Parameters
;pbPresent 
;Pointer to a Boolean value that indicates whether a docking station 
;is present in a local machine. The function sets *pbPresent to TRUE 
;if a docking station is present. Otherwise, the function sets *pbPresent
;to FALSE. 
;
;Return Value
;If the operation succeeds, the function returns CR_SUCCESS. Otherwise, 
;the function returns one of the CR_-prefixed error codes that are defined
;in cfgmgr32.h
;

#DefineFunction IsDockingStationPresent()
   dll=StrCat(DirWindows(1),"cfgmgr32.dll")
   lpbool=BinaryAlloc(4)
   BinaryPoke4(lpbool,0,0)
   retval=DllCall(dll,long:"CM_Is_Dock_Station_Present",lpbinary:lpbool)
   bool=BinaryPeek4(lpbool,0)
   Return(bool)
#EndFunction


x=IsDockingStationPresent()
Message("Dock Present",x)

Article ID:   W16223
File Created: 2004:03:30:15:43:30
Last Updated: 2004:03:30:15:43:30