asp.net中调用c++dll出现问题,GetDelegateForFunctionPointer(IntPtr ptr, Type t)中ptr为null
--------------------编程问答-------------------- 应该是这个IntPtr api = GetProcAddress(hLib, APIName);获取不到值,你在哪里调用Invoke这个委托的。api 如果为null,那就帮不了你了,是人家第三方包的东西,你用应该最了解! --------------------编程问答-------------------- DllInvoke dll = new DllInvoke(Server.MapPath(@"~/Bin/Train.dll"));Train train = (Train)dll.Invoke("Train", typeof(Train));
int flag = train(trainSequence, inputUnits, outputUnits, inDimTrain, resultout, modelout);
dll = new DllInvoke(Server.MapPath(@"~/Bin/Predict.dll"));
PredictDLL predict = (PredictDLL)dll.Invoke("PredictDLL", typeof(PredictDLL));
flag = predict(trainedModel, inputSequence, inputTrainSequence, outputSequence, modelin, inDimPredict, predictLength, resultOutputUnits, TrainUnits);
train和predict 中调用 地址写的动态的
补充:.NET技术 , ASP.NET