winfunc.i 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* ===========================================================================
  2. file : WINFUNC.I
  3. by : Jurjen Dijkstra, 1997
  4. mailto:jurjen@global-shared.com
  5. http://www.global-shared.com
  6. purpose : Forward declarations for functions that call API procedures.
  7. This include file is included in windows.i
  8. =========================================================================== */
  9. /* prevent multiple inclusion: */
  10. &IF DEFINED(WINFUNC_I)=0 &THEN
  11. &GLOBAL-DEFINE WINFUNC_I
  12. /* start persistent procedure holding the function implementations.
  13. The forward declarations are needed in winfunc.p, but the
  14. "run winfunc.p persistent" part must be prevented in winfunc.p : */
  15. DEFINE NEW GLOBAL SHARED VARIABLE hpWinFunc AS HANDLE NO-UNDO.
  16. &IF DEFINED(DONTRUN-WINFUNC)=0 &THEN
  17. IF NOT VALID-HANDLE(hpWinFunc) THEN RUN Winfunc.p PERSISTENT SET hpWinFunc.
  18. &ELSE
  19. hpWinFunc = this-procedure:handle.
  20. &ENDIF
  21. /* --- the forward declarations : --- */
  22. FUNCTION GetLastError /* 1:1 implementation of API */
  23. RETURNS INTEGER /* = dwErrorID */
  24. ()
  25. IN hpWinFunc.
  26. FUNCTION GetParent /* 1:1 implementation of API */
  27. RETURNS INTEGER /* = hWnd van parent */
  28. (input hwnd as INTEGER)
  29. IN hpWinFunc.
  30. FUNCTION ShowLastError /* calls GetLastError and views it as alert-box */
  31. RETURNS INTEGER /* = dwErrorID */
  32. ()
  33. IN hpWinFunc.
  34. FUNCTION CreateProcess /* wrapper for the big API definition */
  35. RETURNS INTEGER /* = if success then hProcess else 0 */
  36. (input CommandLine as CHAR,
  37. input CurrentDir as CHAR,
  38. input wShowWindow as INTEGER)
  39. in hpWinFunc.
  40. &ENDIF /* &IF DEFINED(WINFUNC_I)=0 */