View Single Post
Old 4th September 2008, 02:42   #28
LoRd_MuldeR
Major Dude
 
LoRd_MuldeR's Avatar
 
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
Returning a value could also be "optimized" with a macro:

code:
!macro _CallCRL return_var dll namespace class method args
CLR::Call /NOUNLOAD `${dll}::${namespace}::${class}::${method}(${args})`
Pop ${return_var}
!macroend

!define CallCRL "!insertmacro _CallCRL"

code:
Section
${CallCRL} $0 "SomeAssembly.dll" "SomeNamespace" "SomeClass" "SomeMethod" '"some string value",12,"15.8",false'
MessageBox MB_OK "Return value is: $0"
SectionEnd


My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc
My source of inspiration: http://youtu.be/lCwY4_0W1YI
LoRd_MuldeR is offline   Reply With Quote