From: kobi1 on
I am trying to enable the printer sharing in windows XP
programmatically.
The operation i am trying to imitate is:
1. right click on a local printer (in printers and faxes window).
2. choose sharing from menu.
3. press on the "I understand the security risk..." hyper link.
4. choose just enable printer sharing.
5. press on the "OK" button.

I have tried to look all over the web for what happening below the
surface when i choose the "Just enable printer sharing" but could not
find a clue.

Please help me understand what is happening when i choose the "just
enable printer sharing" and how can I imitate it?

Thanks,
Kobi.
From: Felix on
kobi1(a)hotmail.com wrote:
> I am trying to enable the printer sharing in windows XP
> programmatically.

It's not a kernel question but win32 api.
See api forum (comp.os.ms-windows.programmer.win32)
From: Kellie Fitton on
On Jun 22, 4:49 am, ko...(a)hotmail.com wrote:
> I am trying to enable the printer sharing in windows XP
> programmatically.
> The operation i am trying to imitate is:
> 1. right click on a local printer (in printers and faxes window).
> 2. choose sharing from menu.
> 3. press on the "I understand the security risk..." hyper link.
> 4. choose just enable printer sharing.
> 5. press on the "OK" button.
>
> I have tried to look all over the web for what happening below the
> surface when i choose the "Just enable printer sharing" but could not
> find a clue.
>
> Please help me understand what is happening when i choose the "just
> enable printer sharing" and how can I imitate it?
>
> Thanks,
> Kobi.




Hi,

You can use the following APIs to add and delete a share name
from a server's list of shared resources:

NetShareAdd()

NetShareDel()

Or,

INetCfg

http://msdn.microsoft.com/en-us/library/bb525384(VS.85).aspx

http://msdn.microsoft.com/en-us/library/bb525386(VS.85).aspx

http://msdn.microsoft.com/en-us/library/ms805265.aspx

http://msdn.microsoft.com/en-us/library/ms805249.aspx

Kellie.