Solved

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

Posted on 2006-07-06
2
1,537 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now