[Bug 10293] New: sequentially running games/ apps with different SafeDisc versions fails

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Nov 3 07:40:11 CDT 2007


           Summary: sequentially running games/apps with different SafeDisc
                    versions fails
           Product: Wine
           Version: CVS/GIT
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: wine-kernel
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: focht at gmx.net

Created an attachment (id=8945)
 --> (http://bugs.winehq.org/attachment.cgi?id=8945)
Patch which fixes various isses regarding kmode driver unload/reload


currently wine's kernel mode driver cleanup/unloading facility has several
issues when it comes to applications/games that unload and reload different
driver versions on the fly.

Example: run multiple SafeDisc 2.x, 3.x and 4.x games sequentially.
Symptoms: game either hangs/crashes/exits silently

Usually the SD security driver is placed in
If a SafeDisc protected program encounters a driver version that is
incompatible it does the following:

- stop the current security service (should unload the driver)
- unpack own security driver from resources to temp storage and move the binary
to "c:\windows\system32\drivers\secdrv.sys", overwriting the previous
- restart the service (loads the new driver)

This currently fails for various reasons:


The driver binary is loaded using LoadLibrary() -> the matching FreeLibrary()
is missing on service stop.
This leads to sharing violation when the driver binary going to be replaced
(CopyFile fails).


No driver unload routine called. Very problematic.
Various objects (symlinks) created by driver entry are not freed.
When the driver is reloaded the init routine usually fails with "object


Driver state objects (driver_obj, driver_extension) have undefined state due to
static storage.
Raises all sorts of problems because the driver entry routine does not init all


Attached is a patch which fixes these problems, allowing to sequentially run
programs with different SafeDisc Versions.


Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the wine-bugs mailing list