Solved

Incompatible types: 'string' and 'PAnsiChar' PLEASE HELP! 300pts

Posted on 2006-07-06
2
1,539 Views
Last Modified: 2008-01-09
Hi,

how to i fix this?

i have a variable 'IPAddress' which is a string which i would like to use as follows:

   WinExec('mstsc /v ' + IPAddress + ' /f',sw_ShowNormal);

but i get the following error ---> Incompatible types: 'string' and 'PAnsiChar'.

I think i need to use a pointer or typecast but i think i feel asleep in the lecture at that stage!

many thanks
naresh.
0
Comment
Question by:pate60
2 Comments
 
LVL 26

Accepted Solution

by:
Russell Libby earned 300 total points
ID: 17050767

WinExec(PChar('mstsc /v ' + IPAddress + ' /f'),sw_ShowNormal);

Regards,
Russell
0
 
LVL 1

Author Comment

by:pate60
ID: 17050822
Cheers Russell!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question