equal
deleted
inserted
replaced
95 * Loads the dll and get funcs ptr |
95 * Loads the dll and get funcs ptr |
96 * |
96 * |
97 * @param driver_name String containing driver's dynamic library name |
97 * @param driver_name String containing driver's dynamic library name |
98 * @return Library handle |
98 * @return Library handle |
99 */ |
99 */ |
100 LIB_HANDLE LoadCanDriver(LPCTSTR driver_name) |
100 LIB_HANDLE LoadCanDriver(LPCSTR driver_name) |
101 { |
101 { |
102 // driver module handle |
102 // driver module handle |
103 LIB_HANDLE handle = NULL; |
103 LIB_HANDLE handle = NULL; |
104 |
104 |
105 #ifndef NOT_USE_DYNAMIC_LOADING |
105 #ifndef NOT_USE_DYNAMIC_LOADING |
106 if(handle == NULL) |
106 if(handle == NULL) |
107 { |
107 { |
108 handle = LoadLibrary(driver_name); |
108 handle = LoadLibraryA(driver_name); |
109 } |
109 } |
110 |
110 |
111 if (!handle) |
111 if (!handle) |
112 { |
112 { |
113 fprintf (stderr, "%d\n", GetLastError()); |
113 fprintf (stderr, "%d\n", GetLastError()); |