FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Access violation with many includes
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Access violation with many includes

Posted: Tue Aug 26, 2008 04: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Access violation with many includes

Posted: Tue Aug 26, 2008 04: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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM

Access violation with many includes

Posted: Tue Aug 26, 2008 04:25 PM

I think I understand. Can you send me an example.

Thank you

Harvey
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Access violation with many includes

Posted: Tue Aug 26, 2008 04: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM

Access violation with many includes

Posted: Tue Aug 26, 2008 04:42 PM

Try it later today when I get back home.

Thanks for all your help.

Thank you

Harvey
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM

Access violation with many includes

Posted: Wed Aug 27, 2008 01: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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Access violation with many includes

Posted: Wed Aug 27, 2008 05:15 AM

Glad to hear you got it working.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM

Access violation with many includes

Posted: Wed Aug 27, 2008 06: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

Continue the discussion