Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 Mar : Reordering Protocols

www.cryer.info
Managed Newsgroup Archive

Reordering Protocols

Subject:Reordering Protocols
Posted by:fedaykin
Date:Tue, 29 Mar 2005 09:48:54

Hi,

Ofter installing my LSP and new chain I have to change order of protocols to make windows
use my chain instead of the old one. WSCWriteProviderOrder call is not working. I am
filling a memory block with Catalog IDs(DWORD) and trying to pass it. All I am receiving
is bad parameter error also a message box appears telling too many protocols(even less
then current provider count also it returns same with nil parameter as pointer). I am sure
there is a memory acess problem for the dll.

var
  CatIDs, tmpID: LPDWORD;
begin
  CatIDs := GetMemory(SizeOf(DWORD)*Count);
.
.// Filled with new order
.
  ret := WSCWriteProviderOrder(CatIDs, Count);

I really don't know why this is happening, everthing seems OK. Is it possible to have a
problem about allocated memory location etc ? Example from msdn and sporder.exe is running
without problems. I am also able to make windows use my LSP chain by reordering protocols
using sporder.exe. I am locked, It is nearly impossible to find detailed instructions or
example about this topic so do not hesitate to share your ideas.

Regards

Replies:

www.cryer.info
Managed Newsgroup Archive