/*///////////////////////////////////////////////////////////////////////////// <ARGS> as_sendto as_sendcopy as_blindcopy as_subject as_body as_attachments[] all (By Readonly) </ARGS> <RETURN><PRE> 1 if it succeeds. -1 if an error occurs. </PRE></RETURN> <DESC><PRE> This creates a new Memo in Lotus Notes. ------------------------------------------------------------------------------- Revision History Date User Description =============================================================================== 5.2.1999 Dominik Baer new </PRE></DESC> //////////////////////////////////////////////////////////////////////////// */ |
ls_sql = "Select "
For ll_fornext to maxschlaufe Choose Case parameter_typ CASE "number" ls_sql += " 1 as " + parameter[ll_fornext] + "," CASE "date" ls_sql += " to_date('01-01-98', 'DD-MM-YY') " + parameter[ll_fornext] + "," etc.. ls_sql += " from dual"
|
Um das Resultset einer Oracle Stored Procedure
mit einem Retrievalargument an ein Datawindow zu schicken
gibt es folgende Lösung:
Create package xyz.p_Cur
AS Type rctyp IS REF CURSOR; Procedure pr_abc (rc in out p_Cur.rctyp, a in varchar2) END p_Cur; / Create Procedure pr_abc ( rc in out p_cur.rctyp, a in varchar2)
|
Eine gute Lösung stellt die API-Funktion sleep() dar, um ressourcenschonend
zu programmieren.
Es stellt sich oft das Problem in der eigenen Applikation auf eine
äusseres Ereignis zu warten.
Ein nvo mit folgenden Funktionen und Ereignissen ist dabei hilfreich:
External:
Function ulong Sleep (ulong milliseconds) Library "kernel32.dll" UserEvent: ue_canceltimeout ( Argument: string as context) // the argument is needed to distinguish different purposes uf_settimeout(integer ai_seconds, string as context) returns long // Return 1 if the function succeeds, 0 if the function reached the timeout, -1 if an error occured Long ll_RetVal Time ltm_start Long ll_Seconds ltm_Start = Now Do while ll_Seconds < ai_seconds Sleep(500) //sleeps for 500 milliseconds ll_RetVal = This.Event Static Trigger ue_canceltimeout(as_context) Choose Case ll_RetVal CASE 1 RETURN 1 CASE 0 ll_Seconds = SecondsAfter(ltm_Start, Now()) If ll_Seconds < 0 THEN ll_Seconds = ll_Seconds * -1 END IF CONTINUE CASE ELSE RETURN -1 END CHOOSE
The action may programmed in the ue_canceltimeout event.
|
Prozessmonitor
Dll
Deklarationen
//Konstanten Deklaration CONSTANT ulong PROCESS_TERMINATE = 1 CONSTANT ulong PROCESS_CREATE_THREAD = 2 CONSTANT ulong PROCESS_SET_SESSIONID = 4 CONSTANT ulong PROCESS_VM_OPERATION = 8 CONSTANT ulong PROCESS_VM_READ = 16 CONSTANT ulong PROCESS_VM_WRITE = 32 CONSTANT ulong PROCESS_DUP_HANDLE = 64 CONSTANT ulong PROCESS_CREATE_PROCESS = 128 CONSTANT ulong PROCESS_SET_QUOTA = 256 CONSTANT ulong PROCESS_SET_INFORMATION = 512 CONSTANT ulong PROCESS_QUERY_INFORMATION = 1024 CONSTANT ulong PROCESS_ALL_ACCESS = 2035711 Function ulong FindWindowA( string lpClassName, string lpWindowName) Library "USER32.DLL" Function boolean SetForegroundWindowA( ulong hwnd) Library "USER32.DLL" Function boolean BringWindowToTop (ulong hwnd) Library "USER32.DLL" Function ulong FindWindowExA ( ulong hparent, ulong hchild, string lpClassName, string lpWindowName) Library "USER32.DLL" Function ulong SetFocus ( ulong hparent ) Library "USER32.DLL" Function boolean SetForegroundWindow ( ulong hparent ) Library "USER32.DLL" Function boolean EnumProcesses(REF ulong pidprocess[], ulong cb, REF ulong cbneeded) Library "psapi.dll" Function ulong OpenProcess(ulong dwdesiredaccess, boolean binheritHandle, ulong dwprocessid) Library "kernel32.dll" Function boolean EnumProcessModules( ulong hprocess, REF ulong hmodule[], ulong cb, REF ulong lpcbneeded) Library "psapi.dll" Function ulong GetModuleFileNameExA(ulong hprocess, ulong hmodule, REF string lpfilename, ulong nsize) Library "psapi.dll" Function boolean CloseHandle(ulong hobject) Library "kernel32.dll" Function ulong GetModuleFileName( ulong hmodule, REF string lpfilename, ulong nsize) Library "kernel32.dll" Function Long GetLastError() Library 'kernel32.dll' Function ULong CreateMutex(ULong lpsa, Boolean fInitialOwner, String lpszMutexName) Library 'kernel32.dll' Alias for CreateMutexA Function ulong Sleep( ulong dwmilliseconds ) Library "kernel32.dll" FUNCTION INT DragQueryFile(long hDrop, int iFile, REF string szFileName, int cb) LIBRARY "shell32.dll" SUBROUTINE DragAcceptFiles(long hWind, boolean BAccept) LIBRARY "shell32.dll" SUBROUTINE DragFinish(long hDrop) LIBRARY "shell32.dll" |
Die Manipulation von PDF-Files wurde mit einer Print Preparation DLL
der Firma Glance (www.glance.ch) gelöst.
Eine Beschreibung dieser Library finden hier im PDF-Format.
Bei der Lösung wurden Barcodes als Overlay dynamisch zugefügt.
Die Library ist kostengünstig und robust.