|
|
|
Расскажите мне пожалуста про порядок подключения DLL
|
|||
|---|---|---|---|
|
#18+
И можно ли его как-то изменить? DLL1 лежит в папке программы DLL2 лежит в виндовс/систем32 называются они ОДИНАКОВО. при пуске программы она лезет в DLL2. а очень бы хотелось чтобы лезла в DLL1, а про DLL2 и думать забыла. возможен такой вариант? програмулина на BCB. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 16.03.2006, 13:38 |
|
||
|
Расскажите мне пожалуста про порядок подключения DLL
|
|||
|---|---|---|---|
|
#18+
В HKLM\SYSTEM\CurrentControlSet\Control\Session Manager cоздай DWORD key SafeDllSearchMode = 1, если надо чтоб винда сначала искала дллы в System и Windows папках и = 0, чтобы в текущей папке. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 16.03.2006, 14:33 |
|
||
|
Расскажите мне пожалуста про порядок подключения DLL
|
|||
|---|---|---|---|
|
#18+
Привет, DarkCat! D> при пуске программы она лезет в DLL2. D> а очень бы хотелось чтобы лезла в DLL1, а про DLL2 и D> думать забыла. D> возможен такой вариант? А если полный путь указать ? ---------------------------- Posted via ActualForum NNTP Server 1.3 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 16.03.2006, 15:38 |
|
||
|
Расскажите мне пожалуста про порядок подключения DLL
|
|||
|---|---|---|---|
|
#18+
Делается это следующим образом //----------------получить описатель для текущего источника HINSTANCE hInstRes = AfxGetResourceHandle(); //----------------получить описатель для внешнего источника AfxSetResourceHandle(::GetModuleHandle("dll1.dll")); //--выполнить код необходимый код относящийся к dll1 //--------------------------возврат к оригинальному описателю AfxSetResourceHandle(hInstRes); и т.д. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 16.03.2006, 15:58 |
|
||
|
Расскажите мне пожалуста про порядок подключения DLL
|
|||
|---|---|---|---|
|
#18+
The MFC Extension DLL Resource Search Sequence If you build a dynamically linked MFC client application, many of the MFC library's standard resources (error message strings, print preview dialog templates, and so on) are stored in the MFC DLLs (mfc42.dll, mfco42.dll, and so on), but your application has its own resources too. When you call an MFC function such as CString::LoadString or CBitmap::LoadBitmap, the framework steps in and searches first the EXE file's resources and then the MFC DLL's resources. If your program includes an extension DLL and your EXE needs a resource, the search sequence is first the EXE file, then the extension DLL, and then the MFC DLLs. If you have a string resource ID, for example, that is unique among all resources, the MFC library will find it. If you have duplicate string IDs in your EXE file and your extension DLL file, the MFC library loads the string in the EXE file. If the extension DLL loads a resource, the sequence is first the extension DLL, then the MFC DLLs, and then the EXE. You can change the search sequence if you need to. Suppose you want your EXE code to search the extension DLL's resources first. Use code such as this: HINSTANCE hInstResourceClient = AfxGetResourceHandle(); // Use DLL's instance handle AfxSetResourceHandle(::GetModuleHandle("mydllname.dll")); CString strRes; strRes.LoadString(IDS_MYSTRING); // Restore client's instance handle AfxSetResourceHandle(hInstResourceClient); You can't use AfxGetInstanceHandle instead of ::GetModuleHandle. In an extension DLL, AfxGetInstanceHandle returns the EXE's instance handle, not the DLL's handle. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 16.03.2006, 16:01 |
|
||
|
Расскажите мне пожалуста про порядок подключения DLL
|
|||
|---|---|---|---|
|
#18+
CerebrumДелается это следующим образом... Это если MFC юзать. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 16.03.2006, 16:10 |
|
||
|
Расскажите мне пожалуста про порядок подключения DLL
|
|||
|---|---|---|---|
|
#18+
А человек про BCB интересовался ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 16.03.2006, 16:11 |
|
||
|
|

start [/forum/topic.php?fid=57&msg=33605872&tid=2031741]: |
0ms |
get settings: |
11ms |
get forum list: |
21ms |
check forum access: |
5ms |
check topic access: |
5ms |
track hit: |
58ms |
get topic data: |
14ms |
get forum data: |
4ms |
get page messages: |
52ms |
get tp. blocked users: |
1ms |
| others: | 239ms |
| total: | 410ms |

| 0 / 0 |
