On Fri, 23 Aug 2013, Flávio Etrusco wrote:

On Thu, Aug 22, 2013 at 9:55 PM, waldo kitty <[email protected]> wrote:
On 8/22/2013 16:46, Liyuan Garcia Caballero wrote:

Hi guys,

I need access to remote registry of Microsoft Window and get a data,
it's posible with Pascal?


of course it is possible... the question is how are you expecting to be able
to perform this task...

Somebody can share one code?


no but possibly an idea or two... write a remote "server" that accesses the
registry for whatever you want... then talk to it via a local "client"...

in reality, it should be no different than using ssh or rdp into the remote
host and starting the remote machine's regedit or similar... capturing that
information and feeding it back across the link...

NOTE: i use the term "server" above because you are wanting to connect to a
remote system and pull data from it... in the most general terms, that makes
it a server... the connecting package on the local side is then considered a
client...



I guess he means this:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724840%28v=vs.85%29.aspx

Currently this is not supported by FPC.

What needs to be done is implement

function TRegistry.RegistryConnect(const UNCName: string): Boolean;
begin
  Result := False;
end;

in packages/fcl-registry/src.

The function indicated by Flavio must be used for this.

So I'd guess that would be something like:

function TRegistry.RegistryConnect(const UNCName: string): Boolean;

Var
  Res : HKey;

begin
  Result := RegConnectRegistryA(PAnsiChar(UNCName),FRootKey,@HKey);
  if Result then
    FCurentKey:=Res;
end;


Michael.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to