Attaching Sybase46NTInterface to new version of dll 
Author Message
 Attaching Sybase46NTInterface to new version of dll

I'm missing something here.

In VW 2.5.1, Envy 3.0.1, I have been using Sybase Open Client 10.0.4.
I want to upgrade Open Client to 11.1.1.  I have the following classes:

ExternalInterface subclass: #Sybase46Interface
        includeFiles: ''
        includeDirectories: ''
        libraryFiles: ''
        libraryDirectories: ''
        generateMethods: ''
        beVirtual: true
        optimizationLevel: #full
        instanceVariableNames: 'encoding '
        classVariableNames: ''
        poolDictionaries: 'Sybase46InterfaceDictionary '

Sybase46Interface subclass: #Sybase46NTInterface
        includeFiles: ''
        includeDirectories: ''
        libraryFiles: 'libsybdb.dll '
        libraryDirectories: ''
        generateMethods: ''
        beVirtual: true
        optimizationLevel: #full
        instanceVariableNames: ''
        classVariableNames: ''
        poolDictionaries: 'Sybase46NTInterfaceDictionary '

Attempting to follow the class comments from ExternalInterface, I added
a space to the libraryFiles: argument, as

        libraryFiles: ' libsybdb.dll '

and accept.  So far so good, I can connect to Sybase through the new
dll.  I save the image (or not...). However, upon attempting to exit
the image, I get  "external access failed" trying to perform
Sybase46NTInterface>>dbexit.   Try again, and the exit succeeds.  I
restart the saved image and try to access Sybase, and I get "external
access failed" trying to do a dbopen.

I've tried a bunch of stuff to get around this (generating methods,
parsing include files, etc) but am running out of ideas.  What is the
proper sequence of events to get the upgraded dll
talking to VW?


Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Wed, 18 Jun 1902 08:00:00 GMT  
 Attaching Sybase46NTInterface to new version of dll
Well, after quite a bit of hacking around I figured out a way around my
problem.  I'll post it here in case someone else has encountered the
same problem.

It appears that some handles associated with the old version of the DLL
were remaining cached in my image, despite the initialization that
should be occurring during earlySystemInstallation at startup.  I'm not
exactly sure why this is... possibly due to interaction with Envy. To
solve the problem I put the following initialization code in
update:with:from: in a class that is a dependent of ObjectMemory:

update: anAspect with: aParam from: aSender
        aSender == ObjectMemory ifTrue: [
                (anAspect == #returnFromSnapshot) ifTrue: [
                        (Smalltalk at: ExternalDatabaseConnection defaultConnection) interfaceClass
                                flushOwnAndSuperclassCaches;
                                unloadLibraries ] ].
        ^super update: anAspect with: aParam from: aSender

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help files attached to .DLLs

2. Errors using a dll to attach to shared memory

3. win32clipboardDemo: ImportError: DLL load failed: A device attached ...

4. wxPython+py2exe+win98 ImportError: DLL load failed: A device attached to the system is not functioning

5. ImportError: DLL load failed: A device attached ...

6. Working version: Identify x86 attached

7. NEW NEW NEW CA Visual Objects 2.5 Trial Version ist avaiable

8. DLL and tk (win version , mac version)

9. How to Filein a older version file to a newer version

10. RARS for C55 - New version posted, with bug fix and DST Email version

11. New version of Alpha Unix Poplog version 15.53

12. New version of NT/Win32 and GUI versions of Python

 

 
Powered by phpBB® Forum Software