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 3.6.4 plug-in for 4th Dimension is now available for download.  Like earlier versions of Win32API, Version 3.6.4 is free and open-source for all 4D developers.  The download includes the plugin, complete Visual C++ project, uncompiled demo database (for 4D 2003) that gives examples of each command, and documentation in PDF format.

Update 12/7/2007: We have updated the Macintosh "stub" version for compatibility with 4D v11 SQL (universal binary). No other changes have been made and the version number remains the same.

Download:

Update 03/17/08: Please note that the FTP download site is no longer available, but you may continue downloading this module directly from our website. We apologize for any inconvenience.

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 which 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 has been tested with 4D 6.5 and higher (including 4D 2004 and 4D v11 SQL), on Windows 98, Windows NT 4, Windows 2000, and Windows XP. Some features are not available on all operating systems (those are indicated in the documentation). If you try to use this plugin with Windows 95, make sure that you have Internet Explorer 5.0.1 or higher installed.

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 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: