![]() |
|
|
Регистрация Восстановить пароль |
Регистрация | Задать вопрос |
Заплачу за решение |
Новые сообщения |
Сообщения за день |
Расширенный поиск |
Правила |
Всё прочитано |
![]() |
|
Опции темы | Поиск в этой теме |
![]() |
#1 |
Новичок
Джуниор
Регистрация: 12.06.2009
Сообщений: 2
|
![]()
Здравствуйте,
У меня возникла проблема с динамической загрузкой библиотеки. Есть один файл - ****.dll , который нужно подключить к проекту на MS Visual C++ 2005. Пробывал динамическую загрузку как в посте http://www.programmersforum.ru/showthread.php?t=38078 Но чего-то не получилось.... Кроме этого пробывал загрузить следующим образом: #include <tchar.h> #include <windows.h> HINSTANCE H_DLL ; H_Vcore=LoadLibrary("DLL.dll");//Загрузка библиотеки if (H_Vcore)//Если загружена то: { ... Помогите пожалуйста начинающему... Заранее очень благодарен! |
![]() |
![]() |
![]() |
#2 |
Новичок
Джуниор
Регистрация: 12.06.2009
Сообщений: 2
|
![]()
Вот ошибки при использовании вышеуказанного поста:
1>.\Main.cpp(43) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [8]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>.\Main.cpp(56) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [7]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>.\Main.cpp(72) : error C2664: 'LoadLibraryExW' : cannot convert parameter 1 from 'const char [10]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>.\Main.cpp(78) : error C2664: 'lstrcpyW' : cannot convert parameter 1 from 'LPSTR' to 'LPWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>.\Main.cpp(79) : error C2664: 'lstrlenW' : cannot convert parameter 1 from 'LPSTR' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>.\Main.cpp(80) : error C2664: 'wsprintfW' : cannot convert parameter 1 from 'CHAR *' to 'LPWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>.\Main.cpp(85) : error C2664: 'wsprintfW' : cannot convert parameter 1 from 'CHAR *' to 'LPWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>.\Main.cpp(91) : error C2664: 'wsprintfW' : cannot convert parameter 1 from 'CHAR *' to 'LPWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>.\Main.cpp(125) : error C2440: '=' : cannot convert from 'CHAR [13]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>.\Main.cpp(138) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'CHAR [13]' to 'LPCWSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 1>.\Main.cpp(146) : warning C4244: 'return' : conversion from 'WPARAM' to 'int', possible loss of data 1>Build log was saved at "file://f:\Мои документы\Visual Studio 2005\Projects\Tempik\Tempik\Debug\B uildLog.htm" 1>Tempik - 10 error(s), 1 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== |
![]() |
![]() |
![]() |
#3 |
Старожил
Регистрация: 22.05.2007
Сообщений: 9,087
|
![]()
У Вас в проекте юникод подключен. Или в настройках проекта Char set меняйте на not set (или как там уж я не помню. первый пункт там)
или перед всеми строками константными пишите L: Пример: L"трям" или _T("трям") или TEXT("трям") |
![]() |
![]() |
![]() |
![]() |
||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
Загрузка BitMap из DLL | Македонский | Мультимедиа в Delphi | 2 | 02.06.2009 17:28 |
Динамическая память. | Пaвeл | Помощь студентам | 16 | 31.05.2009 21:16 |
загрузка .dll | blackstersl | Общие вопросы Delphi | 1 | 29.04.2009 21:53 |
Явная загрузка DLL | FaTaL | Общие вопросы Delphi | 17 | 10.10.2008 08:57 |
Загрузка DLL | Hollander | Общие вопросы Delphi | 3 | 21.05.2007 20:19 |