Solved

createfile problems

Posted on 1998-02-26
4
411 Views
Last Modified: 2013-12-04
   hFile:=createFile (
        nmFile, GENERIC_READ,
        FILE_SHARE_READ, nil, OPEN_EXISTING,
        FILE_ATTRIBUTE_NORMAL, FILE_FLAG_NO_BUFFERING
      );

      if hFile=INVALID_HANDLE_VALUE then
        raise eFileCopy.createLastError (
          'could not open source file '+sp+' to get it''s size.');

this results in an system error 50 ("the network request is not supported") for me on a windows 95 system, and no errors on NT (same filename). What am I doing wrong here?
0
Comment
Question by:lowlevel
  • 2
4 Comments
 
LVL 11

Expert Comment

by:alexo
ID: 1411572
And the value of nmFile is...
0
 
LVL 22

Expert Comment

by:nietod
ID: 1411573
Also have you tried it without NO_BUFFERING.  I know you want to avoid the overhead of buffering when you are just geting the file size, but there are a lot of restrictions associated with it and it could be causing a problem.  Its worht a try.
0
 
LVL 1

Accepted Solution

by:
hasmet earned 100 total points
ID: 1411574
HANDLE hTemplateFile (the last argument) must be NULL for win95.

0
 
LVL 22

Expert Comment

by:nietod
ID: 1411575
Oh I see the problem.  Hasmet is on the right track.  You have a comma where you want a "|" and you are missing the last parameter.
   Try
createFile (nmFile, GENERIC_READ,
FILE_SHARE_READ, nil, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_NO_BUFFERING,
NULL);
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Is it possible to use a scroll bar to view records in a form? 7 42
Vb.Net Loading Word 11 98
Need to impress with my knowledge of .NET 5 81
Authentication of Web Services 3 46
This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now