Search Our Site



Customer Sign In

User Name

Password


Quick Links

News@orchard

Newsletter

Win32API Plugin

Orchard Software is pleased to announce that Win32API version 5.0 plug-in for 4th Dimension is now available for download.  Like earlier versions of Win32API, Version 5.0 is free and open-source for all 4D developers. The download includes the plugin, complete Visual C++ project, and documentation that gives examples of each command in PDF format.

Download:

Note: This is a software module made available free to 4D developers. This is not part of the Orchard Software line of laboratory information system products.


About Win32API:

Win32API is a plugin for 4th Dimension that lets your Windows applications take advantage of Windows-specific features that are not exposed by native 4th Dimension commands. Win32API lets you set a custom icon for any window, change the name of your 4D application in the title bar and task bar, customize file open and save dialogs, get information from the Regional Settings control panel, and much more.

Win32API is provided free of charge to the 4D developer community, with complete source code. A Macintosh stub is also included for cross-platform compiling.

Win32API 5.0 has been tested with 4D v11 SQL and 4D v12 on Windows XP SP3, Vista, 7, Server 2003, and Server 2008. If you need to support older versions of 4D or older versions of Windows, please use an older version of Win32API.

Orchard Software does not provide technical support for this plugin, but we do appreciate hearing about any problems you discover. To report a problem, send an email to Jeffrey Kain.


New in Version 5.0:

64-bit Compatibility

Now compatible with the 64-bit version of 4D Server

Updated 4D API

The plug-in has been rewritten to use the latest plug-in API from 4th Dimension.


New in Version 4.1:

sys_SetRegText, sys_SetRegLongint, sys_SetRegArray, and sys_SetRegBLOB

Added 4 new commands (sys_SetRegText, sys_SetRegLongint, sys_SetRegArray, and sys_SetRegBLOB) to set Windows registry values. 

sys_IsAppRunningAsService

Added a new command sys_IsAppRunningAsService to determine if 4D is currently running as a Windows service.

Modified in Version 4.1:

sys_ShellExecute

Fixed a misspelling in an error code for sys_ShellExecute.


New in Version 4.0:

sys_GetTimeZoneList

Retrieves a list of time zones defined in Windows.

TWAIN_GetSources, TWAIN_SetSource, and TWAIN_AcquireImage

Adds basic support for TWAIN imaging devices.

sys_IsAppFrontmost

Determines if 4D is the frontmost application.

gui_MessageBox

Allows access to the default Windows message boxes.

gui_HideTaskBar and gui_ShowTaskBar

Hides or shows the Windows task bar.

gui_SetMIDOpaque and gui_SetMDITransparent

Makes the 4D MDI window background opaque or transparent.

gui_HideTitleBar and gui_ShowTitleBar

Hides and shows the 4D window title bar.

gui_MaximizeMDI, gui_MinimizeMDI and gui_RestoreMDI

Programmatically maximizes, minimizes, and restores the 4D MDI window.

sys_DisableTaskManager and sys_EnableTaskManager

Enables or disables the ability of the user to open the Windows task manager.

Modified in Version 4.0:

gui_RespectToolbar

Fixed several bugs when using gui_RespectToolbar and maximizing or minimizing the window.

gui_SetTrayIcon

Fixed a bug in gui_SetTrayIcon that would prevent the icon from being removed under Windows 7.

sys_GetOSVersion

The command sys_GetOSVersion will now recognize Windows 7, Windows Server 2008, and Windows Server 2008 Release 2.

sys_DirectoryExists

Updated sys_DirectoryExists to correctly return false if the specified drive does not exists.

gui_RespectToolbar

When using gui_RespectToolbar, the array <>TB_NOTIFICATION can no longer be used with 4Dv11.  Instead a generic call to each process that has an active toolbar will be made.

Windows Compatibility

Updated multiple commands to work correctly under Windows 7.

4D v11 Compatibility

Updated multiple commands to work correctly using 4D v11.


New in Version 3.6.4:

gui_GetWindRect

When running with dual monitors, the command gui_GetWindRect will now optionally return coordinates relative to the actual monitor that the 4D window is displayed on, instead of the coordinates of the virtual desktop. Choosing between the existing functionality and this new functionality will be controlled by a new parameter.

sys_GetOSVersion

The command sys_GetOSVersion will now recognize Windows Vista and Windows Longhorn OSs.

gui_SetWindowStyle

Enables and disables toolbox icons.

sys_FileExists

Tests for the existence of a file.

sys_DirectoryExists

Tests for the existence of a directory.

sys_SetPluginLanguage

Changes language of the returned error text for sys_ShellExecute.

sys_PrintDirect2Driver

Sends raw data to a printer driver by name.

sys_KillProcessByName

Terminates processes by name

sys_KillProcessByID

Terminates processes by process ID.

sys_EnumProcesses

Enumerates processes and supplies names and IDs.

sys_LogonUser

Validates Windows logon credentials.


Modified in Version 3.6.3:

The command sys_GetDocumentList will set the 4D system variable Error to zero if the command completes successfully. Otherwise, the Error will be set to the Windows error code that corresponds to the generated error.

When selecting a directory with gui_GetOpenFileName or gui_GetSaveFileName using the FD_SELECT_DIRECTORY selector, the plug-in could lock the directory until 4D exited. This is now fixed.

Compatibility is improved between this plug-in and 4D 2004. Specifically, the commands gui_GetOpenFileName and gui_GetSaveFileName will work correctly with the FD_SELECT_DIRECTORY selector when called from 4D Client 2004 and higher. The incompatibility was caused by the new naming conventions of the local cache directories created by 4D Client 2004 and higher.


New in Version 3.6.1:

Get and set colors for Windows user interface objects

Commands have been added allowing you to get and set the RGB values for the different user interface elements in Windows, such as buttons, text, windows, menus, tool tips, and more.

Get and set Windows environment variables

Commands have been added to let your 4th Dimension application read and write Windows environment variables.

Read the Windows Registry

Commands have been added to let your 4th Dimension application read values from the Windows Registry.

A replacement for 4D's "Document List" command

A replacement function for 4D's "Document List" has been created, which allows you to specify a limit on the number of files returned. This is very useful when you have to process directories with tens of thousands of files (4D's equivalent command always returns the full list of files, which can be time-consuming).

Modified In Version 3.6.1:

The command sys_GetOSVersion is updated to support Windows Server 2003.

The command gui_LoadBackground will no longer change the Windows system setting for live window resizing when using the BM_SCALE parameter.

The commands gui_GetOpenFileName and gui_GetSaveFileName have been enhanced to improve efficiency when working in directories with a very large number of files.

A 150-character size limit on the sys_ShellExecute text parameters has been eliminated.

The command sys_IsAppLoaded on Windows NT 4.0 or greater, without psapi.dll installed, caused an application crash.

An application’s background was lost after a number of window resizes when the BM_SCALE parameter was used with gui_LoadBackground.

The command sys_getGUID contained a small memory leak.

An occasional crash has been eliminated when installing a tray icon in the Windows task bar.

Since the last version of Win32API (3.5.5), Win32API would cause an error at startup of 4th Dimension if Internet Explorer was not installed, or was manually removed.


New in Version 3.5.5:

gui_RespectToolbar

This command allows you to place one or more tool bar windows at any edge of the screen. This command will intercept window maximize commands to take the tool bar into account. It will also provide a callback mechanism to notify your tool bar process whenever the main 4D application window has been resized so your toolbar can adjust itself as required.

sys_IsConnectedToInternet

This command allows you to test if the user has configured a default Internet connection before you attempt to access the Internet from 4D. This code was graciously contributed by Michael Bond of the 4D developer community.

Modified In Version 3.5.5:

Carbon Stub

A stub for Mac OS X (for 4D 6.8 and 4D 2003) is provided with this release.

sys_PlayWav

This command would crash 4D if the path to your .WAV file was more than 80 characters in length. A full Windows path name is now allowed.

sys_GetCmdLine

This command would crash 4D or return random data if the path to your executable file or any of the command line parameters were more than 80 characters long.

gui_LoadBackground

This command would return an error code if you called this command more than once with the same path and format parameters. This no longer happens.

sys_GetCmdLine

Some users have reported problems with this command. We've found that the memory buffer that contains the command line parameters is corrupted by either 4D or Windows when 4D starts. We've added some special code to work around this corruption, but if any of the paths or command line arguments contain double-quotes you may get unexpected results with this command. Unfortunately, there's nothing we can do to resolve this problem.


New In Version 3.5.3:

sys_IsAppLoaded

This command will test to see if a specified program is running.

gui_SelectColor

This command presents the standard Windows color picker dialog, along with programmatic control over the 16 "custom colors" panes in the dialog.

Modified In Version 3.5.3:

Compatibility

Improved compatibility with 4D 6.5.x.

gui_RestrictWindow

Added some new constants to gui_RestrictWindow to enable/disable more standard window controls:

sys_ShellExecute

Added support for very long parameters in sys_ShellExecute (from 80 characters to 250 characters), so it's now possible, for example, to pass a long URL string. Also added support for forward slashes to support URLs.

sys_GetPrintJob

Fixed a potential crash with sys_GetPrintJob that occurred if sys_GetPrintJob was called twice and if the user clicked the Cancel button in the first PRINT SETTINGS dialog the first time it was called.

sys_SetClientTime

The internals for sys_SetClientTime now use a standard Win32 function call to convert between local time and GMT, instead of a custom algorithm.


Download:


See also: