Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C++] Managed and Native Data Types
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Thu Dec 18, 2008 5:21 pm    Post subject: [C++] Managed and Native Data Types Reply with quote

How do I convert native data types to managed and vice-versa. The most important one for me is the string (native data type) and the String^ (managed data type).
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Thu Dec 18, 2008 5:48 pm    Post subject: Reply with quote

How do you mean? They are pretty much the same.
Back to top
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Thu Dec 18, 2008 7:52 pm    Post subject: Reply with quote

I can already see where this is goin

Don't use managed C++
Back to top
View user's profile Send private message
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Tue Dec 23, 2008 12:03 pm    Post subject: Reply with quote

slovach wrote:
I can already see where this is goin

Don't use managed C++


It's hard to design programs without managed code Evil or Very Mad I'm trying to use native functions by converting managed input into native data because native functions only accept native data types.
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Tue Dec 23, 2008 2:00 pm    Post subject: Reply with quote

Use C#, managed C++ has no support any more.
Back to top
View user's profile Send private message
TraxMate
Master Cheater
Reputation: 0

Joined: 01 Mar 2008
Posts: 363

PostPosted: Tue Dec 23, 2008 2:11 pm    Post subject: Reply with quote

What's managed C++?
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Tue Dec 23, 2008 4:54 pm    Post subject: Reply with quote

TraxMate wrote:
What's managed C++?

C++ with the .NET Framework.
Back to top
View user's profile Send private message
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Wed Dec 24, 2008 7:02 am    Post subject: Reply with quote

slovach wrote:
Use C#, managed C++ has no support any more.

Can I use FindWindow in C#? If you want to get an idea of what I'm trying to do, I'm trying to get input from a textbox and convert it into something FindWindow and other functions accept.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Wed Dec 24, 2008 7:13 am    Post subject: Reply with quote

nwongfeiying wrote:
slovach wrote:
Use C#, managed C++ has no support any more.

Can I use FindWindow in C#? If you want to get an idea of what I'm trying to do, I'm trying to get input from a textbox and convert it into something FindWindow and other functions accept.



Import it from user32.dll.

http://pinvoke.net/default.aspx/user32/FindWindow.html

Code:
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindow(string lpClassName, string lpWindowName);

_________________
Back to top
View user's profile Send private message
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Wed Dec 24, 2008 1:06 pm    Post subject: Reply with quote

I really really really wanted to do it in C++, but I'll see what I can do with C#.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Wed Dec 24, 2008 1:45 pm    Post subject: Reply with quote

Then do it in C++, but don't use CLR. Stick with Win32 if your going to be using C++.
_________________
Back to top
View user's profile Send private message
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Wed Dec 24, 2008 5:30 pm    Post subject: Reply with quote

I fear the GUI coding is going to be hell for me. I've tried doing GUI with native and it looks crap compared to managed.
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Wed Dec 24, 2008 5:54 pm    Post subject: Reply with quote

nwongfeiying wrote:
I fear the GUI coding is going to be hell for me. I've tried doing GUI with native and it looks crap compared to managed.


Lookup manifests
Back to top
View user's profile Send private message MSN Messenger
ElJEffro
Grandmaster Cheater Supreme
Reputation: 0

Joined: 15 Apr 2007
Posts: 1881
Location: La Tierra

PostPosted: Wed Dec 24, 2008 6:14 pm    Post subject: Reply with quote

If you insist on C++ and want an easy-make GUI you can use CodeGear C++ builder or QTDesigner
Back to top
View user's profile Send private message
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Wed Dec 24, 2008 7:51 pm    Post subject: Reply with quote

I'll try finding out what manifest is because I like Microsoft Visual Studio and I don't want another IDE on my laptop.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites