Access violation with many includes

Access violation with many includes

Postby James Bott » Tue Aug 26, 2008 4:17 pm

I am starting a new thread due to a change in topic in another thread. Here is the original question:

--------------
Seem to have hit a wall. I have a main.rc file with many includes. Maybe 600.
About 14 won't compile. I get and access violation.
So I added a main2.rc with the 14 includes included in main.rc. Same access violation.

Any thoughts?

Thank you
Harvey
----------------

Yikes, 600! What are they all? How many are RC files? What eactly does the error say? Can you combine some of those includes into the same file?

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby James Bott » Tue Aug 26, 2008 4:22 pm

Yes 600. Some may be due to my ineffieient programing over the years. The program is very complex. After I finish conversion to 32bits. I'll let you have a copy NC.

all rc files. Just says "access violation" when compiling. If I comment out the items at the bottom of this list it compiles.


Then your only option may be to combine some of them into one file. There must be a maximum number of include files allowed and you have exceded it.

If you are using an include file for each dialog (as workshop wants to do) you can eliminate any of them by changing the ID reference to use the actual numeric ID rather than the manifest constant located in the include file.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby hag » Tue Aug 26, 2008 4:25 pm

I think I understand. Can you send me an example.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby James Bott » Tue Aug 26, 2008 4:40 pm

Harvey,

When you create a dialog, Workshop will generate an include file something like this:

#define ID_DATE 110
#define ID_CLIENT 120
#define ID_ARTICLE 130
#define ID_AMOUNT 140
#define ID_TOTAL 150
#define ID_NOTES 160

Then in your code you write something like this:

redefine get var dData ID ID_DATE...

You can rewrite the line like this:

redefine get var dData ID 120 ...

You will have to do the same for all the #defines in the include file. Then you can just eliminate the include file.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby hag » Tue Aug 26, 2008 4:42 pm

Try it later today when I get back home.

Thanks for all your help.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby hag » Wed Aug 27, 2008 1:51 am

I created a small dll for the items the main.rc file will not compile. Everything is working fine even the manifest. You've been a great help.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby James Bott » Wed Aug 27, 2008 5:15 am

Glad to hear you got it working.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby StefanHaupt » Wed Aug 27, 2008 6:59 am

Harvey,

an access violation can also happen if you have an icon file with several included icons inside and with a color depth which is not supported by the resource compiler of borland.
Delete the unsupported icons out of the icon file and it will work

If I remember right, 8bit and 24bit colors are supported. So all icons files from vista can´t be used in their original form.
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 79 guests