[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenResourceFile problem...bug?



On 15 Dec 92 07:48:23 GMT, jmk3@crux3.cit.cornell.edu (Jay M. Krell) said:

> I am creating a resource file with CreateResourceFile. It has normal access:
> $C3. This works fine.

> I use OpenResourceFile to open it. If I ask for only write access (2), I get
> error $4E, access not allowed. If I ask for read and write (3), no problem.

[Bits o' stuff removed for brevity.]

> Any ideas what is going on?

    Yup. When you call OpenResourceFile, part of the process involves reading
the resource file header to find out where the resource file map is located,
which is required to manipulate the file. Since the Resource Manager was
instructed to open the file with only Write access, it'll get the error when it
tries to read the file header. When dealing with resource files, you must give
the Resource Manager at least Read-only access.

>   --Jay, jay.krell@cornell.edu


Jim Murphy                             "...you really should know that it's
Internet:  ujmurphy@mcs.drexel.edu     never too late to get up and go." 
GEnie:     A2Pro.Jim                   
AOL:       Jimurphy3                   - The Cure, "Doing the Unstuck"