hi, i want to ask using AssignFile, Reset, FileSize, BlockRead, CloseFile on c++ builder (codegear 2009) ??

system.AssignFile(objfile,OpenDialog1->FileName);
system.Reset(objfile,1);
FSize=system.FileSize(objfile);
system.BlockRead(objfile,Buf,SizeOf(Buf),NumRead);
system.CloseFile(objfile);

and get error :
[BCC32 Error] UnitFile.cpp(1102): E2294 Structure required on left side of . or .*

thanks in advance

sorry my english bad

Recommended Answers

Answered by Duoas 1,025 in a post from

I've only used these things in Delphi, but it looks right to me.

The only concern I have is based upon your error message:

what kind of thing is OpenDialog1? Is it a pointer to a TOpenDialog? (And not an direct object or a reference?) Is it visible

Jump to Post

All 2 Replies

I've only used these things in Delphi, but it looks right to me.

The only concern I have is based upon your error message:

what kind of thing is OpenDialog1? Is it a pointer to a TOpenDialog? (And not an direct object or a reference?) Is it visible in the current scope where you are using it?

Hope this helps.

thanks for the reply,

yes its and its _visible_, i dunno why it can be error ?? im confused

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.