Is there any way to invoke .net (version 4) dll in NSIS - dll

I have a dll which is build using .net 4. I have tried using CLR plugin and system call in both am getting status as error but not exactly sure what is the reason. Sample snippet of CLR I have pasted down (In the below code snippet am getting an error as "I method not found in M dll", its actually considering only first letter)
Function Test
CLR::Call /NOUNLOAD 'Myexample_Logic.dll' 'MynameSpace.classname' 'Instance' 0
pop $0
MessageBox MB_OK $0
CLR::Destroy
FunctionEnd
Can someone help me in resolving this issue.
Thanks in advance

Related

Cake Build Suppress MSBuild Warnings

I am trying to build my .net solution using cake build file. I am trying to use the documentation on the website here
My current msbuild task looks like this:
MSBuild("./solution.sln", new MSBuildSettings()
.SetConfiguration(environmentSetting)
.SetMSBuildPlatform(MSBuildPlatform.Automatic)
.SetVerbosity(Verbosity.Minimal)
.SetMaxCpuCount(System.Environment.ProcessorCount)
.SetNodeReuse(false)
.WithConsoleLoggerParameter("ErrorsOnly"));
It keeps throwing error for the parameter .WithConsoleLoggerParameter. I am not sure what am I doing wrong here.
The Microsoft documentation shows here the same thing and I tried running it in powershell with the same parameters and it ran just file.
Actually I figured it out. I am not sure how the argument customization works so any explanation for that would be great!
I changed the code to
MSBuild("./solution.sln", new MSBuildSettings(){
ArgumentCustomization = args=>args.Append("/consoleloggerparameters:ErrorsOnly")
}
.SetConfiguration(environmentSetting)
.SetMSBuildPlatform(MSBuildPlatform.Automatic)
.SetVerbosity(Verbosity.Minimal)
.SetMaxCpuCount(System.Environment.ProcessorCount)
.SetNodeReuse(false));
Seems to work. Hope this helps someone!

File or assembly name ****.dll or one its dependenies not found

I have added a new service reference to a vb.net dll after excluding the previous one. While debugging, When I am sending a request through a form, the new reference is not able to create a object.exception is at this line:
Dim ObjPricingService As New PricerWebService.MedicalProductService_V2_0
MedicalProductService_V2_0 is the new service reference. The exception is:
File or assembly name ****.dll or one of its dependencies not found.
Source:mscorlib
the name of the *.dll changes every time I debug..so its a random one. the code is built in Visual Studio 2003.
Please provide a solution.
It sounds strange, that the Library changes the name every time you debug. The best thing todo, is to try to set an standard name (if you wrote the library). Also you can try to
Import PricerWebService
and then to use only
Dim ObjPricingService As New MedicalProductService_V2_0
If this will be not fix your problem, try to upgrade your framework + Visual Studio Version (VS2003 what?).
BTW: It would be great if you can send us the error text ;)

Delphi Clipboard and Graphics DCU's Missing

I have this weird thing that keeps happening when trying to use the following unit:
XLSReadWriteII 5
Every time I add one of their components to my form and compile it, it gives me the following error:
[dcc32 Fatal Error] Unit1.pas(16): F1026 File not found: 'C:\Users\Gordon\Documents\RAD Studio\Projects\grdi\Clipbrd.dcu'
This tells me that there is no DCU's in my API, no I get the same error on my windows 7 and my windows 8 pc's. Delphi was installed from the embarcadero website via their installer.
If I download a clipboard.dcu and .pas file and run it again it gives me the same error saying Graphics.duc is missing...
I have emailed the company Axolot Data (the creators of XLSReadWrite 5) with regards to this issue, they just keep telling me my API is corrupt, on both pc's??
However what I find strange is that their supplied samples run.
How can I fix this?
I think I have found a solution or reason this is happening.
XLSReadWrite 5 is a VCL component which references the VCL API, im using FMX.
The package was designed for VCL and not FMX but for some reason shows up in the FMX Units.
Strange but that might be my cause

out of process COM server throws error 217

I've created a COM object using NATIVE c++ - both COM object and it's native client works perfectly.
the next step was to implement the COM object as a out of process COM server( hosted by the dllhost process.
I followed the standard registry-change procedure(http://support.microsoft.com/kb/198891) and both client and COM server started to work properly under the dllhost.exe process.
However, I can see that sometime the host server crashes and the dllhost.exe pop up a message stating error 217 - nothing else is detailed.
Any idea how can I debug the COM infrastructure? any preferred tools I can use?
many thanks,
Ofer
However, I can see that sometime the
host server crashes and the
dllhost.exe pop up a message stating
error 217 - nothing else is detailed.
I'm curious as to what happens here, in more detail -- does the dllhost process really crash (with a structured exception) or does it show a message box and then die?
You should be able to attach any debugger (Visual Studio or WinDBG) either when the problem happens or at any time in advance.
Break into the debugger and check the callstack when the problem occurs.
If it's due to a race condition of some kind, it may not surface when the debugger is attached, so I'd start with attaching when the message box is shown, and see what information can be gathered from there.
Presumably your code is in the callstack; if not, you may be short on luck.
Note that it always helps to have Microsoft symbols available, it's easiest via the public symbol server as described at the bottom of this page:
http://www.microsoft.com/whdc/devtools/debugging/debugstart.mspx

MSSOAP30 Object error: 0x80004002: Interface does not exist (VB)

I'm well and truly stuck with MS SOAP 3.0, which I'm currently running from VBA Excel in Office 2003. I have used MS SOAP Toolkit 3 to create a proxy class which I am using. If I don't use it, I don't get the error, but then I'd have to write out the entire proxy class by hand and it's massive.
When my program is first run, I get "Class not registered". If I run it again I get "Interface not supported". The error messge is:
run-time error: '-2147467262'
SoapMapper: The SoapMapper for element
callContextIn could not be created
HRESULT=0x80004002: No such interface
supported.
-WSDLOperation:Initialisation of a SoapMapper for operation getSNFormat
HRESULT=0x80004002: No such interfce
supported.
The error occurs when:
Set sc_PartService = New SoapClient30
Help would be greatly appreciated.
Thanks
Just now I deleted "Set", got an error of course, put it back and it ran properly. Once. Not again, and I've been unable to recreate this. Never encountered anything like that before!
HAve you checked if the COM object exists / is registered?