Net Function on W95 and NT 
Author Message
 Net Function on W95 and NT

Is it possible to make a program that will run on W95 en NT using the
same code.

If not. How can I declare net functions for W95 (if supported). I know
that there are serverstools for NT running on W95, in that case I would
think that it should be possible.

Thanks,

Jan Bouwhuis.



Sun, 12 Aug 2001 03:00:00 GMT  
 Net Function on W95 and NT
Depends what you want to do - some things can be done via WNet functions
(WNetOpenEnum and WNetEnumResource work on both NT and 95).

Microsoft has a KB discussing some of the Net functions availability under
Win95 ... Q125700 , and a page on their web site ...
www.microsoft.com/win32dev/guidelns/apidiffs.htm

Cheers,

Andy

Quote:
>Is it possible to make a program that will run on W95 en NT using the
>same code.

>If not. How can I declare net functions for W95 (if supported). I know
>that there are serverstools for NT running on W95, in that case I would
>think that it should be possible.

>Thanks,

>Jan Bouwhuis.



Sun, 12 Aug 2001 03:00:00 GMT  
 Net Function on W95 and NT
Good Luck,

Unfortunately many of the more useful Net functions are only implemented on
Windows 95 inside 16-bit DLL's (NOT 32-BIT!!)

That means you face some ugly choices;

1. Write your application that wants to use the Net functions as a 16-bit
application which means you have to go back to VB4-16 and lose most of your
portability to NT

2. Thunk from the 32-bit layer down to the 16-bit layer to call the 16-bit
functions. Unfortunately there is lots of bad news with this option.

Firstly, you still lose portability to NT since the equivalent functions on
NT are 32-bit and anyway, NT doesn't support the same types of thunks as
Windows 95 (try researching Generic Thunks & Flat Thunks)

To make matters worse, Microsoft will tell you the only way to perform a
thunk is to write your own which involves writing some C-like code which is
then passed through the thunk compiler to produce some code which you then
have to include into both a 32-bit DLL and an equivalent 16-bit DLL. Then
you can call the 32-bit DLL and it will thunk to the 16-bit DLL which then
calls the Net function you really wanted in the first place.

I've managed to bypass all this when thunking in Delphi but it required
in-line assembler and lots of time to debug.

Of course Windows 95 has some thunking DLLs so that Microsoft code can get
access to the same Net functions you want but they don't document the
functions in the 32-bit side of the thunk so you can use them.

Have I scared you yet??? Of course Andy is right when he says that it all
depends on what Net functions you want access to.

If I can help in any way don't hesitate to email me off-line and I'll do
what I can.

Regards
Tim Blizard

Quote:

>Depends what you want to do - some things can be done via WNet functions
>(WNetOpenEnum and WNetEnumResource work on both NT and 95).

>Microsoft has a KB discussing some of the Net functions availability under
>Win95 ... Q125700 , and a page on their web site ...
>www.microsoft.com/win32dev/guidelns/apidiffs.htm

>Cheers,

>Andy


>>Is it possible to make a program that will run on W95 en NT using the
>>same code.

>>If not. How can I declare net functions for W95 (if supported). I know
>>that there are serverstools for NT running on W95, in that case I would
>>think that it should be possible.

>>Thanks,

>>Jan Bouwhuis.



Mon, 13 Aug 2001 03:00:00 GMT  
 Net Function on W95 and NT
Yup--you nailed the problems.  However, an EASY solution presents
itself--Why not write a DCOM object that resides on an NT Server and calls
all of the NetAPI32 calls?  Then a client can be written that connects to
this computer and uses the security.  I've got both written, but I'm still
working on a couple of aspects (like changing passwords and forcing changes
when they log in).  But other than that, it works great!

If security is high priority, you'll need to encrypt user names and
passwords before you send them over the network, however.

Robert

--
Kill the wow to send me mail

Quote:

>Good Luck,

>Unfortunately many of the more useful Net functions are only implemented on
>Windows 95 inside 16-bit DLL's (NOT 32-BIT!!)

>That means you face some ugly choices;

>1. Write your application that wants to use the Net functions as a 16-bit
>application which means you have to go back to VB4-16 and lose most of your
>portability to NT

>2. Thunk from the 32-bit layer down to the 16-bit layer to call the 16-bit
>functions. Unfortunately there is lots of bad news with this option.

>Firstly, you still lose portability to NT since the equivalent functions on
>NT are 32-bit and anyway, NT doesn't support the same types of thunks as
>Windows 95 (try researching Generic Thunks & Flat Thunks)

>To make matters worse, Microsoft will tell you the only way to perform a
>thunk is to write your own which involves writing some C-like code which is
>then passed through the thunk compiler to produce some code which you then
>have to include into both a 32-bit DLL and an equivalent 16-bit DLL. Then
>you can call the 32-bit DLL and it will thunk to the 16-bit DLL which then
>calls the Net function you really wanted in the first place.

>I've managed to bypass all this when thunking in Delphi but it required
>in-line assembler and lots of time to debug.

>Of course Windows 95 has some thunking DLLs so that Microsoft code can get
>access to the same Net functions you want but they don't document the
>functions in the 32-bit side of the thunk so you can use them.

>Have I scared you yet??? Of course Andy is right when he says that it all
>depends on what Net functions you want access to.

>If I can help in any way don't hesitate to email me off-line and I'll do
>what I can.

>Regards
>Tim Blizard


>>Depends what you want to do - some things can be done via WNet functions
>>(WNetOpenEnum and WNetEnumResource work on both NT and 95).

>>Microsoft has a KB discussing some of the Net functions availability under
>>Win95 ... Q125700 , and a page on their web site ...
>>www.microsoft.com/win32dev/guidelns/apidiffs.htm

>>Cheers,

>>Andy


>>>Is it possible to make a program that will run on W95 en NT using the
>>>same code.

>>>If not. How can I declare net functions for W95 (if supported). I know
>>>that there are serverstools for NT running on W95, in that case I would
>>>think that it should be possible.

>>>Thanks,

>>>Jan Bouwhuis.



Mon, 12 Nov 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Net Function on W95 and NT

2. ora8 varchar2 --ODBC--> W95/NT VB5 DAO

3. Automation works under NT but not W95

4. Forms look fine on W95 system but are in disarray on NT 3.51 system

5. sub window_onload(), NT vs W95 ?

6. UserControl OCX run in NT but not in W95

7. What version of W95/NT do you have

8. W95 vs NT Query speed

9. Problem with EXEs stored as OLE Objects in A97 on W95/NT

10. NT/W95 username

11. VB application works under W95 but does't under W NT

12. CreateFile/GetFileTime on open file : NT ok, W95 fails

 

 
Powered by phpBB® Forum Software