VAStGoodies.com
Your VA Smalltalk OSS repository. Powered by
with
.
Configuration Maps
|
Projects
|
Developers
|
Statistics
|
RSS
|
Disclaimer
|
About
|
Help
Configuration Map Names
AbtOleEdit
AbxProcessPeek
Announcements Core
Announcements Demos Seaside
Announcements Tests
Announcements Tools VA
Cloudfork
Cloudfork ActiveItem
CodeManagement
ComputerTelephony
Compuware SplitterWidget
Flotr Core
Glorp
GlorpTest
GlorpVAPortMap
Goodies - UML Designer
JQuery-plugin Autocomplete
JQuery-plugin Bind
JQuery-plugin QTip
JQuery-plugin Radiobutton and Checkbox
JQuery-plugin Table Sorter
JQuery-plugin Table Sorter Example
JQuery/JQueryUI
JQuery/JQueryUI Tests
JSON
Magritte
Magritte Seaside
Magritte Tests
Mastering ENVY/Developer Refactoring Browser Extensions
MetaTest Browser
MethodPragmas
MethodWrappers
MethodWrappersBase
Modelling
MSKCouchDB
MSKCouchDBWithTests
MSKDyBase
MSKDyBaseWithTests
MSKFFLLInterface
MSKFreeImageWrapper
MSKGeneralDatabase
MSKGLibWrapper
MSKGLibWrapperWithTests
MSKJSONWrapper
MSKJSONWrapperWithTests
MSKLogging
MSKLua
MSKLuaWithTests
MSKMdlPlainRuntime
MSKMSAgentWrapper
MSKOleAdditions
MSKOOBaseDLLWrapper
MSKOOoAutoGenerated
MSKOOoBaseLibrary
MSKOOoCodeGenerator
MSKOOoExamplesAndIDE
MSKOOoSmalltalkExtensions
MSKOpenCLSupport
MSKOpenGLSupport
MSKOpenGLSupport Core
MSKOpenGLSupport Examples
MSKOpenGLSupport Examples FreeImage
MSKOpenGLSupport GUI
MSKOpenGLSupport Runtime Loading
MSKOpenGLSupport Structures
MSKPlatformExtension
MSKPostgreSQL
MSKPostgreSQLAbtDBMLayer
MSKPostgreSQLAbtDBMLayerWithTests
MSKPostgreSQLWithTests
MSKProcessViewer
MSKRemoteCommandTools
MSKRexxSupport
MSKRexxSupportWithTests
MSKScintillaWrapper
MSKSDL
MSKSDLWithTests
MSKSnarlInterface
MSKSQLite
MSKSQLiteAbtDBMLayer
MSKSQLiteWithTests
MSKSyslog
MSKSystemExtension
MSKTestModel
MSKTreBinding
MSKTreBindingWithTests
MSKUDPMulticast
MSKUREWrapper
MSKVectorExtension
MSKVectorExtensionsWithTests
Obdobion, EMan - Developer
Obdobion, EMan - Distribution
Obdobion, EMan - Examples
Obdobion, EMan - Runtime
Philemon Event Support
Philemon Melissa
Philemon TaggedData
Philemon Tools
Pier
Pier Seaside
Pier Seaside Tests
Pier SIXX Persistence
Pier Tests
Raphaël - JavaScript Library
Refactoring Browser
Refactoring Browser Model
RefactoryTesting
Seaside GoogleChart
SIXX
SIXX Tests
SpsPdfLib
SpsPdfLib Development
SUnit Browser
SUnit Browser - Packagable
SWFObject2 Seaside Addon
SWFObject2 Seaside Addon Demo
Test Browser
VAStGoodies.com Tools
VBRegex
WinCrypt
WinCryptWithTests
WinHttpClient
WinHttpClientWebServiceSupport
WinHttpClientWebServiceSupportWithTests
WinHttpClientWithTests
z.ST: Database, PostgreSQL-Base
Versions
Download
1.12
1.11
1.10
1.9
1.8
1.7
1.6
1.5 + BvD 2009Sep18
1.5
1.4
1.3
1.2
1.1
1.0
Applications
Browse
MSKPlatformExtension 1.12
Config. Expressions
Required Maps
Jump
Notes
Contains extension to the base classes - mainly used for work with external c libraries 1.5> Methods added to kill processes by id or name under Windows 1.6> Methods copied/changed from AbtHtmlAccessor to get read access to string values from the Windows registry 1.7> Changes added from BvD2009Sep18: Support for simple async calls added 1.8> Method added for unique parameter handling 1.9> To reduce the creation of parameter array - methods have been added for zero-arg functions, one-arg, two-arg, three-arg and four-arg functions. The original way of calling external functions should now only be used for function with more than 4 arguments 1.10) helper methods added 1.11) Conversion methods from Windows for path to url-based file paths added 1.12) Program Starter - additional method for waiting of an end of an external process (Windows only)
Comment
Contains extension to the base classes - mainly used for work with external c libraries I use this application as a prerequisites to wrap external c libraries. To create a new binding several steps have to be done: 1) Create a new application with a prerequisite 'MSKPlatformExtension'. Within this application define a new subclass of MSKExternalLibraryInterface. 2) All external API call definitions are stored in entries in a PoolDictionary. Due to the fact, that the API calls may be used not only in the newly defined subclass of MSKExternalLibraryInterface you should define the pool variable using PRAGMA statements in the defining application class (on the class side) of the subclass of MSKExternalLibraryInterface. 3) Now overwrite some class methods in the defined subclass of MSKExternalLibraryInterface and add the pool dictionary to the class definition 3.1) Overwrite <libraryName> to return the name of the external library. Remember that different platforms may have different names. 3.2) Overwrite (if needed) <libraryCallingConvention> to define the calling convention of all methods in that library. 3.3) Overwrite <initializeFunctionPool> to define each external API call. 4) Now define your APi calls .... 4.1) For each call you need an entry within the pool dictionary. Add an entry for each external API call. As an example: _PRAGMA_PSQLFunctions %%PRAGMA DECLARE (name: PSQLFunctions isPool: true ) (name: PQconnectdb pool: PSQLFunctions isConstant: false valueExpression: '') 4.2) Now add the actual API definition to the <initializeFunctionPool> method by adding a statement like: PQconnectdb := self createPlatformFunction: #('PQconnectdb' nil (pointer) pointer). The array has the following contents: index 1 name of the external function (as exported) 2 optional ordinalValue of the external function 3 array of parameter definitions 4 return value definition 4.3) Now you may add a 'high-level' Smalltalk method to wrap that function call like and do additional stuff: connectToDBVia: connectionString ACTION initiate a connection to a database location defined by connectionString PARAMETERS connectionString: <String> EXCEPTIONS ExMSKDBNCException RETURN VALUE <PGConn> | address | address := self lowLevelExecute: PQconnectdb parameters: (Array with: connectionString asPSZ). address ~= 0 ifTrue: [^PGConn address: address api: self]. ExMSKDBNCException signalWith: 'apiConnect' with: connectionString
Use the
VAStGoodies.com Tools
to submit your contributions.