fbpx
Welcome, Guest
Username: Password: Remember me
Visual Objects

Please use this forum to post questions about Visual Objects and Vulcan.NET
  • Page:
  • 1

TOPIC: VO Code Translate to X#

VO Code Translate to X# 1 month 2 weeks ago #12385

  rjpajaron's Avatar Topic Author rjpajaron Offline Posts: 249
Hello,

How to write this to X#:
	hDll := _VOLoadLibrary("DLL.dll")
	
	IF hDll != NULL_PTR
		pProcAdr := GetProcAddress(hDll,PSZ("StartFunction"))
		IF pProcAdr != NULL_PTR
			PCALL(pProcAdr)
		ENDIF
	ELSE
		? "Could not load DLL.dll."+CRLF2;
					+"That's bad news..."
		
		hDll := NULL_PTR
	ENDIF

XSharpLoadLibrary return an Assembly.

Thanks a lot....

---

Rene
--

Rene Pajaron

Please Log in or Create an account to join the conversation.

VO Code Translate to X# 1 month 2 weeks ago #12389

  Chris's Avatar Chris Offline Posts: 1641
Hi Rene,

Yeah, with XSharpLoadLibrary() you can only load a .Net library, not Win32 ones. For your sample, simply declare a _DLL FUNC, specifying the dll in the declaration as you would do also in VO and the simply call the function normally, with a simple "StartFunction()".

You can still use LoadLibrary() and PCALL() etc, but there's really no point to, also with the _DLL statement the dll will be loaded only when needed anyway, and you will have in addition compile time checking.

Edit: Well the above is assuming you want to call a Win32 function indeed. Or maybe you just want to call another function written in X# in another library? If that's the case, again better just reference the dll and call the function directly. Again, the dll will be loaded in memory only when it will be actually needed.
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Last edit: by Chris.

VO Code Translate to X# 1 month 2 weeks ago #12393

  rjpajaron's Avatar Topic Author rjpajaron Offline Posts: 249
Hi Chris,

All VO codes will be move to X#. I am done "porting" to X#, building it to become an app began yesterday and a lot of "errors" mostly on ADS API calls and missing "DEFINES"

Your comments below reminds me of something. The DLL that to be loaded on is "secure key" DLL. It could be VO or C but this time I might move it to X# to minimized problems but I need an "obfuscator". Do you something to recommend?

Chris wrote: Hi Rene,

Yeah, with XSharpLoadLibrary() you can only load a .Net library, not Win32 ones. For your sample, simply declare a _DLL FUNC, specifying the dll in the declaration as you would do also in VO and the simply call the function normally, with a simple "StartFunction()".

You can still use LoadLibrary() and PCALL() etc, but there's really no point to, also with the _DLL statement the dll will be loaded only when needed anyway, and you will have in addition compile time checking.

Edit: Well the above is assuming you want to call a Win32 function indeed. Or maybe you just want to call another function written in X# in another library? If that's the case, again better just reference the dll and call the function directly. Again, the dll will be loaded in memory only when it will be actually needed.

--

Rene Pajaron

Please Log in or Create an account to join the conversation.

VO Code Translate to X# 1 month 2 weeks ago #12403

  Chris's Avatar Chris Offline Posts: 1641
Hi Rene,

Not myself. I have never used one, but I know several people here have been using obfuscators for a few years now, hopefully someone will step in!
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

VO Code Translate to X# 1 month 2 weeks ago #12414

  vzeljko's Avatar vzeljko Offline Posts: 4
I use neo-ConfuserEx obfuscator and for me it works fine.
It is free and open-source.
github.com/XenocodeRCE/neo-ConfuserEx

Zeljko

Please Log in or Create an account to join the conversation.

  • Page:
  • 1