Solved

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

Posted on 2006-07-06
2
1,544 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month4 days, 2 hours left to enroll

630 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