#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Sat, 26 Nov 2016 04:06:24 +0100
changeset 21055 53363d877a99
parent 21054 bb4a42618bb7
child 21056 fc38f476bc23
#FEATURE by cg class: ExternalLibraryFunction added: #dllMapping:
ExternalLibraryFunction.st
--- a/ExternalLibraryFunction.st	Fri Nov 25 20:17:38 2016 +0100
+++ b/ExternalLibraryFunction.st	Sat Nov 26 04:06:24 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 2004 by eXept Software AG
 	      All Rights Reserved
@@ -204,7 +202,7 @@
   Synchronous vs. Asynchronous calls:
 
     by default, foreign function calls are synchronous, effectively blocking the whole ST/X system
-    (that is by purpose,´because most C-code is not prepared for being interrupted, and also, normal
+    (that is by purpose,´because most C-code is not prepared for being interrupted, and also, normal
      code is not prepared for a garbage collector to move objects around, while another C thread might
      access the data...).
     Therefore, the following will block all ST/X activity for 10 seconds
@@ -297,6 +295,25 @@
     "Created: / 10-04-2012 / 12:21:45 / cg"
 !
 
+dllMapping:aDictionary
+    "allows for dll's to be replaced,
+     for example, if you want to use the mozilla sqlite dll
+        C:\Program Files\Mozilla Firefox\mozsqlite3.dll
+     for the sqlite3, execute:
+        ExternalLibraryFunction
+            dllMapping at:'sqlite3'
+            put: 'C:\Program Files\Mozilla Firefox\mozsqlite3.dll'
+     for mingw:
+        ExternalLibraryFunction
+            dllMapping at:'sqlite3'
+            put:'C:\mingw64\opt\bin\libsqlite3-0.dll'
+    "
+
+    DllMapping := aDictionary
+
+    "Created: / 26-11-2016 / 04:06:14 / cg"
+!
+
 dllMappingAt:baseLibname put:aNameOrPath
     "allows for dll's to be replaced,
      for example, if you want to use the mozilla sqlite dll