Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2006-07-06
2
Medium Priority
?
1,547 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 1200 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

783 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