Problem with Deplhi 2010 an Plugin Developpement

tkotko

Member
We upgraded to Delphi 2010 and Win 7. (using Oracle 11)
My plugin did recompile and build without any problems. When deploying the DLL the plugin does not work at all anymore:

I debugged a little an saw that I only get cryptic returns for different built in functions:

For example the following returns a somewhat strange result (so far this worked like a charm)

procedure OnConnectionChange;

var
L_username: PWideChar;
L_password: PWideChar;
L_DB: PWideChar;

begin
c := IDE_Connected;
IDE_MenuState(PlugInID, 5, c);
IDE_GetConnectionInfo(L_username,L_password,L_DB);
ShowMessage('User: ' + L_username + ' PW ' + L_password + ' @ ' + L_DB);

This code is executed immediately after login of PL/SQL Developper. The message box appearing only contains cryptical asian signs.

Error

Any idea? :confused:
Prior to the infrastructure change everything worked perfectly.

TKO

 
Last edited:
Hi,

thanks very much for your prompt answer. In fact I also went in hat direction. Unfortunately Embarcadero changed a little someting to the PChar PAnsiChar types and I was no longer able to compile the code with PAnsiChar. (D2006 worked fine regarding this point)

As of Delphi 2010 PAnsiChar and Char is a pointer to a Char which is a unicode character and PAnsiChar is a pointer to a AnsiChar.

With this change Delphi 2010 no longer accepts PAnsiChar as an input to the function IDE_GetConnectionInfo(L_username,L_password,L_DB).

--> E2033 Types of actual and formal var parameters must be identical.

In Delphi 2006 this worked. :confused:

 
I changed the PAnsiChar as well as some other string related operations and I have my Plugin up and running again.

Thanks very much for your help
 
Back
Top