Changeset 3925 for trunk/src/msacm32/internal.cpp
- Timestamp:
- Aug 2, 2000, 5:51:35 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/msacm32/internal.cpp
r2105 r3925 1 /* $Id: internal.cpp,v 1.5 2000-08-02 15:49:32 bird Exp $ */ 1 2 /* -*- tab-width: 8; c-basic-offset: 4 -*- */ 2 3 … … 22 23 #include "debugtools.h" 23 24 24 DEFAULT_DEBUG_CHANNEL(msacm) 25 DEFAULT_DEBUG_CHANNEL(msacm) 25 26 26 27 /**********************************************************************/ … … 31 32 32 33 /*********************************************************************** 33 * MSACM_RegisterDriver32() 34 * MSACM_RegisterDriver32() 34 35 */ 35 36 PWINE_ACMDRIVERID MSACM_RegisterDriver(LPSTR pszDriverAlias, LPSTR pszFileName, 36 37 HINSTANCE hinstModule) 37 { 38 { 38 39 PWINE_ACMDRIVERID padid; 39 40 … … 53 54 if (!MSACM_pFirstACMDriverID) 54 55 MSACM_pFirstACMDriverID = padid; 55 56 56 57 return padid; 57 58 } 58 59 59 60 /*********************************************************************** 60 * MSACM_RegisterAllDrivers32() 61 * MSACM_RegisterAllDrivers32() 61 62 */ 62 63 void MSACM_RegisterAllDrivers(void) … … 64 65 LPSTR pszBuffer; 65 66 DWORD dwBufferLength; 66 67 /* FIXME 67 68 /* FIXME 68 69 * What if the user edits system.ini while the program is running? 69 70 * Does Windows handle that? … … 71 72 if (MSACM_pFirstACMDriverID) 72 73 return; 73 74 74 75 /* FIXME: Do not work! How do I determine the section length? */ 75 76 dwBufferLength = 1024; 76 77 /* EPP GetPrivateProfileSectionA("drivers32", NULL, 0, "system.ini"); */ 77 78 78 79 pszBuffer = (LPSTR) HeapAlloc(MSACM_hHeap, 0, dwBufferLength); 79 80 if (GetPrivateProfileSectionA("drivers32", pszBuffer, dwBufferLength, "system.ini")) { … … 87 88 MSACM_RegisterDriver(s, s2, 0); 88 89 } 89 } 90 } 90 91 s += lstrlenA(s) + 1; /* Either next char or \0 */ 91 92 } 92 93 } 93 94 94 95 HeapFree(MSACM_hHeap, 0, pszBuffer); 95 96 } … … 101 102 { 102 103 PWINE_ACMDRIVERID pNextACMDriverID; 103 104 104 105 if (p->pACMDriverList) 105 106 acmDriverClose((HACMDRIVER) p->pACMDriverList, 0); 106 107 107 108 if (p->pszDriverAlias) 108 109 HeapFree(MSACM_hHeap, 0, p->pszDriverAlias); 109 110 if (p->pszFileName) 110 111 HeapFree(MSACM_hHeap, 0, p->pszFileName); 111 112 112 113 if (p == MSACM_pFirstACMDriverID) 113 114 MSACM_pFirstACMDriverID = p->pNextACMDriverID; … … 119 120 if (p->pNextACMDriverID) 120 121 p->pNextACMDriverID->pPrevACMDriverID = p->pPrevACMDriverID; 121 122 122 123 pNextACMDriverID = p->pNextACMDriverID; 123 124 124 125 HeapFree(MSACM_hHeap, 0, p); 125 126 126 127 return pNextACMDriverID; 127 128 } … … 140 141 141 142 /*********************************************************************** 142 * MSACM_GetDriverID32() 143 * MSACM_GetDriverID32() 143 144 */ 144 145 PWINE_ACMDRIVERID MSACM_GetDriverID(HACMDRIVERID hDriverID)
Note:
See TracChangeset
for help on using the changeset viewer.