Home > Back-end >  W1057 Implicit string cast from 'AnsiChar' to 'stri
W1057 Implicit string cast from 'AnsiChar' to 'stri

Time:02-04

The old tip:
[DCC Error]. The main pas (291) : E2010 Incompatible types: 'Char' and 'AnsiChar'
[DCC Warning]. The main pas (293) : W1057 Implicit string cast from 'AnsiChar' to 'string'
[DCC Error]. The main pas (294) : E2010 Incompatible types: 'AnsiChar' and 'PWideChar'

The following error statement
Params:=PChar (url + '? Op=doLogin& Uname='+ uname + & amp; Upass='+ upass + & amp; Version='+ version);
Status: status + # 13 +='[010] ready to login, params: + params.
ShellExecute (Handle, the 'open', params, ' ', ' ', SW_Show);


Only 20 points, help, withered!

CodePudding user response:

The status, params: string;

Remove AnsiChar (params) AnsiChar

Necessary in the ShellExecute PAnsiChar is used (params)

CodePudding user response:

Var
The status, params: string;

.
ShellExecute (Handle, the 'open', PAnsiChar (params), ' ', ' ', SW_Show);

CodePudding user response:

reference 1st floor kaikai_kk response:
status, params: string;

Remove AnsiChar (params) AnsiChar

Necessary in the ShellExecute PAnsiChar is used (params)


Var status, params: string;
A:
[DCC Error]. The main pas (286) : E2004 Identifier redeclared: 'params'
Other mistakes or do it!

CodePudding user response:

Repeat defines the params

CodePudding user response:

reference 1st floor kaikai_kk response:
status, params: string;

Remove AnsiChar (params) AnsiChar

Necessary in the ShellExecute PAnsiChar is used (params)


I have defined
Var params: pansichar;

CodePudding user response:

I now changed to
Var uname, upass, params, status: string;
ShellExecute (Handle, the 'open', params, ' ', ' ', SW_Show);
Error or
[DCC Error]. The main pas (294) : E2010 Incompatible types: 'string' and 'PWideChar'
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
If change to
ShellExecute (Handle, the 'open', PAnsiChar (params), ' ', ' ', SW_Show);
Will now:
[DCC Warning]. The main pas (294) : W1044 Suspicious typecast of string to PAnsiChar
[DCC Error]. The main pas (294) : E2010 Incompatible types: 'AnsiChar' and 'Char'

CodePudding user response:

Added that I use is 2010

CodePudding user response:

Ask solved yet?
I also met...
  • Related