mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	On Win32, use
LoadLibraryEx(pathname, NULL, LOAD_WITH_ALTERED_SEARCH_PATH) to search dependent DLLs in the directory of the pathname.
This commit is contained in:
		
							parent
							
								
									2a570049ac
								
							
						
					
					
						commit
						0f8b30f8ce
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -493,7 +493,10 @@ _PyImport_LoadDynamicModule(name, pathname, fp) | ||||||
| 			sprintf(p, ".\\%-.255s", pathname); | 			sprintf(p, ".\\%-.255s", pathname); | ||||||
| 			pathname = pathbuf; | 			pathname = pathbuf; | ||||||
| 		} | 		} | ||||||
| 		hDLL = LoadLibrary(pathname); | 		/* Look for dependent DLLs in directory of pathname first */ | ||||||
|  | 		/* XXX This call doesn't exist in Windows CE */ | ||||||
|  | 		hDLL = LoadLibraryEx(pathname, NULL, | ||||||
|  | 				     LOAD_WITH_ALTERED_SEARCH_PATH); | ||||||
| 		if (hDLL==NULL){ | 		if (hDLL==NULL){ | ||||||
| 			char errBuf[256]; | 			char errBuf[256]; | ||||||
| 			unsigned int errorCode; | 			unsigned int errorCode; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum