मैं विंडोज एपीआई से 'लोड लाइब्रेरी' का उपयोग कर रहा हूं, जब मैं एप्लिकेशन चलाता हूं, तो यह मुझे एक त्रुटि कोड 126 फेंकता है। मैंने पढ़ा है कि यह निर्भरताओं के कारण हो सकता है, मैंने जांच की है कि क्या है निर्भरता वॉकर जैसे कुछ अनुप्रयोगों के साथ गलत, लेकिन सबकुछ ठीक था। आवेदन मेंडीएलएल लोड लाइब्रेरी - त्रुटि कोड 126
LoadLibrary:
HMODULE dll_mod = LoadLibrary(L"path_to_dll");
if(dll_mod==NULL){
std::stringstream error;
error << "Could not load plugin located at:\n" << file_full.toStdString() << "\n" << "Error Code: " << GetLastError();
FreeLibrary(dll_mod);
return error.str();
}
प्लगइन कोड:
#include "stdafx.h"
#define DLL_EXPORT
#define PLUGIN_STREAM __declspec(dllexport)
#include <iostream>
#include <vector>
using std::vector;
using std::string;
// Init event (After the loading)
extern "C"{
PLUGIN_STREAM int onInit(char* argv){
return 0;
}
PLUGIN_STREAM void pluginInfo(vector<string> & info){
info.push_back("media_event=false");
info.push_back("status_event=false");
info.push_back("send_event=true");
info.push_back("plugin_name='RadioStream'");
info.push_back("description='This plugin was designed for that people that wants to listen to radio music.\nYou can register your radio and play it later, also we have a gallery of radios that you can check.\nThis plugin is original of Volt and it's originally implemented in the application.'");
info.push_back("success:0");
info.push_back("error:1=Could not open data file");
info.push_back("error:2=Could not prepare plugin");
info.push_back("alert:40=Could not connect to that radio");
}
}
आप किस प्लेटफ़ॉर्म पर प्रोग्रामिंग कर रहे हैं? मैंने Google पर "लोड लाइब्रेरी असफल" टाइप किया है और इसे "लोड कोडर त्रुटि कोड 126 के साथ विफल" के साथ तत्काल स्वतः पूर्ण कर दिया गया है, जिसमें 41,000 परिणाम जैसे कुछ दिए गए हैं, जिसमें YouTube वीडियो शामिल हैं, इसे ठीक करने के तरीके पर। वास्तव में उन लिंक में से कोई भी उपयोगी नहीं है? –
मैंने कुछ ट्यूटोरियल्स का पालन किया, उन्होंने निर्भरताओं के बारे में बात की ... इसके बारे में डीएलएल मौजूद नहीं है, ठीक है, मुझे 4 घंटे की खोज पसंद है और मैं इसे किसी भी ट्यूटोरियल से ठीक नहीं कर सकता, मैंने पहले से ही निर्भरताओं की जांच की है .... : एस – Spamdark
'फ्री लाइब्रेरी (dll_mod) को कॉल करने के लिए यह एक अच्छा अभ्यास नहीं है;' if (dll_mod == NULL) ' – borisbn