How can I use DWORD, INT.... in windows platform?

I’ve read these threads and I tried it. But it dosen’t work.

I want to use DWORD, INT variables to use serial communication But…

When I tried to use DWORD, INT, c2872 Error is happened. because of ambiguous symbol…

any one can help me?

I want to include atrstl.h, stdio.h, stdlib.h, windows.h in my class.

make your code into a DLL and expose only headers to the actual interface to your custom classes, avoid putting such specific headers into any of the exposed interface headers that your game will use.

When I get home i will post you a macro that epic seems to use to avoid variable conflicts that you can turn on and off but still you should definitely not include “windows.h” or atlslt.h etc in your custom header that you expose to the game.

wow, Thank you ! I’m looking forward it!! :slight_smile:

Hi ,

Take a look at the answer to this post and see if it helps with what you need.

I solved it!
finally, now I can read datas from serial port!

What I do have to do is include .h file into the class that I have to use, not into the header of the class!

i got a hint from chrys! thx :slight_smile:

I failed including DLL… I don’t know how to do it.

But… I’m happy to be partially successful in my works.

Now, What I’m going to do is move pawn by sensor’s value and optimizing reading the value.

I appreciate your help guys:)


Hi ,
hi Chrys,

I have the same problem here. I am trying to read serial port data into unreal. So far without success.

I have two code versions (one with managed C++=/CLR, one without) and don’t manage to get any one of them to compile or link (static DLL versions, online advice seems outdated) in Unreal Engine. I think I also have some problems with the unreal build system which doesn’t quit know what to do.

For example I just try adding a cpp and h file to the project (in VS), use the code in existing cpp files and the whole think won’t build anymore.

The DWORD problem shows up when I try to the non-CLR version.

What exactly is meant with “DLL and expose only headers to the actual interface”? How is that done?

Could you please give me a hint how to proceed or what worked for you?

(As you can see I’m new to Unreal programming)