comp.os.mswindows.programmer.win32
  Home FAQ Contact Sign in
comp.os.mswindows.programmer.win32 only
 
Advanced search
January 2008
motuwethfrsasuw
 123456 1
78910111213 2
14151617181920 3
21222324252627 4
28293031    5
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007    
total
comp.os ... win32 Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Win32 version of fseek         


Author: Jamie
Date: Jan 21, 2008 19:59

Hi, i am re writing alot of old file code and it uses alot of fseek
functions to jump around within a file and was wondering what the
Win32 equivalent is.

From looking i think i need tro use ReadFileEx and use an overlapped
structure to specify the offsets within the stream that i am working
on but am not havbing too much luck yet sorting out the semantics.

Any help woudl be greatfully appreciated!

Jamie
1 Comment
  Next Available Drive?         


Author: Larry Lindstrom
Date: Jan 21, 2008 03:55

Hi Folks:

WNetConnectionDialog1() is now working, how do I find the next
available drive to use as a local name for the share? What if A-Z
is taken?

Thanks
Larry
2 Comments
  Find a UNC path to a file on local drive         


Author: P Chase
Date: Jan 21, 2008 03:22

Hi,

I have a requirement to find a UNC path, or a FILE: URL, to a file on
the local machine. The idea is that a remote computer that can see my
shares will be able to use this to access the file on my machine.

For instance, say I have shared my C: drive on my machine WIBBLE with
share name PETE_C, I would like the function, given "c:\users\peterc
\myfile.txt" to return something like "\\WIBBLE\PETE_C\users\peterc
\myfile.txt". A machine on the LAN that could see my machine and had
permission to access my shares could use that path to access the file.

Hopefully, you understand that shares can have a different name to the
drive or directory that is being shared. So that means that you cannot
do a simple-minded translation - you must find out what shares are
available on the machine.

I hoped that WNetGetUniversalName() did what I want, but it doesn't.
It only works if the file is on a drive that is connected to a
*remote* machine. I need an equivalent for where the file is local.

Any pointers would be appreciated.
1 Comment
  Re: Still Unable to Enumerate Shared Resources on Remote PC.         


Author: Larry Lindstrom
Date: Jan 21, 2008 03:16

Thanks Kellie:

I mis-understood the instructions. I didn't realize that
WNetOpenEnum() needed to be called for each call to
WNetEnumResource(). I thought all the WNetEnumResource()
calls would be bracketed by a WNetOpenEnum() WNetCloseEnum()
pair.

As I've said before Kellie, I appreciate your suggestions.

Thanks
Larry
no comments