UE1 - UT Sending information to and from a DLL

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Zur

surrealistic mad cow
Jul 8, 2002
11,708
8
38
48
Hi,

Is there a tutorial somewhere that explains how to communicate with a dll using unrealscript ? For example, I have a dll that creates a log of some sort and would like the information to be relayed to the uscript part and sent back to the server.
 

brold9999

New Member
Apr 5, 2009
142
0
0
I don't know if there's any tutorials out there about this. Seems do-able using native code. Alternatively, it is also possible to connect using a socket - not sure if there are tutorials for this either but it's not too tough and there used to be some documentation around. I believe that native coding is possible using UT99 but never saw a lot of tuts on the subject.
 

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
Since this is about UE1, I think native functions and possibly events are the easiest way to do this. The UnrealWiki should have a tutorial about implementing native functions in UE1.
 

Raven

Member
Jan 17, 2004
147
0
16
40
turniej.unreal.pl
Here are links to tutorials:

http://udn.epicgames.com/Two/NativeFunctions.html
http://udn.epicgames.com/Two/UTNative.html

In addition I had a lot of problem with events (UScript functions called by native code) but I've came out with this:

Code:
#define NAMES_ONLY
//#define AUTOGENERATE_NAME(name) NEMESISCORE_API FName NEMESISCORE_##name;
#define AUTOGENERATE_NAME(name) extern NEMESISCORE_API FName NEMESISCORE_##name=FName(TEXT(#name),FNAME_Intrinsic); 
#define AUTOGENERATE_FUNCTION(cls,idx,name) IMPLEMENT_FUNCTION(cls,idx,name)
#include "NemesisCoreClasses.h"
#undef AUTOGENERATE_FUNCTION
#undef AUTOGENERATE_NAME
#undef NAMES_ONLY

void RegisterNames()
{
	static INT Registered=0;
	if(!Registered++)
	{
		#define NAMES_ONLY
		#define AUTOGENERATE_NAME(name) extern NEMESISCORE_API FName NEMESISCORE_##name; NEMESISCORE_##name=FName(TEXT(#name),FNAME_Intrinsic);
		//#define AUTOGENERATE_NAME(name) extern NEMESISCORE_API FName NEMESISCORE_##name=FName(TEXT(#name),FNAME_Intrinsic); 
		#define AUTOGENERATE_FUNCTION(cls,idx,name)
		#include "NemesisCoreClasses.h"
		#undef DECLARE_NAME
		#undef NAMES_ONLY
	}
}

Of course NemesisCore stuff should be replaced by you package name. Take a look at SampleNativePackage in public sources or my music player: http://turniej.unreal.pl/files/RMusicPlayer_newbeta.zip, it includes full source code so feel free to use it as a base.