If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Corel Paradox > Modifying IDAPI32.CFG

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Oct 2005
Posts: 12
Modifying IDAPI32.CFG

Hello All,
I work as a system admin for some company. My company wants to install an application that uses BDE on all the employees' computers. On some of those computers there are programs that use BDE as well, which prevents me from just replacing the IDAPI32.CFG.

What I need to do is to add a certain definition to the IDAPI32.CFG without changing the old settings, so that the other programs installed would continue to work.

Now this needs to be automated, so I can't go over every single end user's computer and add that definition with the BDEAdmin.

I was wondering wether you are familiar with the format of the IDAPI32.CFG file, as it doesn't seem to be an ordinary text file. If I knew the format of the file it would be easy to modify it using c/c++ which I know pretty well.
Any other Idea (merging IDAPI32.CFG files using a programming language/command line/anything which is not BDEAdmin) would be welcomed as well

thanks in advance!
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Oct 2005
Posts: 6
Format of Borland IDAPI32.CFG

pyrocks wrote: "My company wants to install an application that uses BDE on all the employees' computers. On some of those computers there are programs that use BDE as well, which prevents me from just replacing the IDAPI32.CFG. What I need to do is to add a certain definition to the IDAPI32.CFG without changing the old settings, so that the other programs installed would continue to work.

"If I knew the format of the file it would be easy to modify it using c/c++ which I know pretty well. Any other Idea (merging IDAPI32.CFG files using a programming language/command line/anything which is not BDEAdmin) would be welcomed as well."

Well, I think I MAY be able to offer SOME help. I'm in the process of converting a old Pdox5.0/Win3.1 system to Pdox11/WinXP. When I was just getting acquainted with Pdox (9-10 years ago), I wrote a program to read the 16-bit IDAPI.CFG file and to print a report showing all the parameters in neat little columns. It's basically an ASCII text file EXCEPT that the separators between parameters aren't CR-LF but other odd characters. (I haven't used it for years, and I can't remember whether it was based on some actual documentation from the old CompuServe PDOXWIN Forum, or I just doped it out by examining a hex dump (I tend to think it was the latter).

When I saw your message, I hadn't yet gotten around to test to see whether it would work on the 32-bit IDAPI32.CFG. I just ran it, and it seems to work just fine. That is, the output report looks sensible.

The program is writen in ObjectPAL (very similar to Pascal) and fairly extensively commented, so I think examining the source would give you a fairly big head start in understanding the format enough to write the program you need to automatically insert the parameters you want to add.

If you don't find a better source of info (e.g. somebody somewhere with a tattered old manual that explains the syntax), then perhaps this would be your best bet.

Now all we have to do is figure out how I can get a copy of the source code to you. (I'm pretty sure that if I tried to paste it at the end of this message, I'd probably exceed some message-length limits. Even worse, all the lines would be mushed together into one incomprehensble lump.

I think the best strategy would for me to send you an E-Mail with these three attachments:

[a] SOURCE.TXT = ObjectPal Source code that parses file and prints report.
[b] IDAP32.CFG = Current config file for our system = input to report.
[c] RPIDAPI.TXT = Output report = an ASCII-text file ready to print on any printer that uses standard HP PCL (printer control language) codes. which I think is pretty wisely used. N.B. Do NOT import this into NotePad or MS Word or whatever to print it; from the WinXP cmd line, just "copy RPIDAPI.TXT LPT1". (I don't know the command specifics for Mac or Linux, but you get the drift.)

If you can post a message with your E-mail address, I'll be glad to send this stuff.

Otoh, maybe you'll luck out and get a reply from somebody who knows a helluva lot more about Borland IDAPI than I do, and may be able to clue you in about addiional parameters / rules that aren't needed for our fairly simple Paradox setup (e.g. no network).

Anyhow, good luck with it.

.....mandy
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Oct 2005
Posts: 6
P.S. to Pyrocks.

Whoops! A second after I hit "Submit" for my last message, the screen move up and the block providing the option to attach files appeared. (I've only been using this forum for a few days, and I'm not up to speed on all the do's and don'ts and methods yet. Anyhow, if thinks work right, the three files I mention in my previous msg OUGHT to be attached to this combined into one IDAPI.ZIP file:

PKZIP (tm) FAST! Create/Update Utility Version 0.92 03-06-89
Copyright 1989 PKWARE Inc. All Rights Reserved. PKZIP/h for help

Length Method Size Ratio Date Time Name
------- ------ ------ ----- ---- ---- ----
15010 Shrunk 6292 59% 10-24-05 23:52 SOURCE.TXT
12587 Shrunk 4255 67% 10-24-05 22:41 RPIDAPI.TXT
6258 Shrunk 2599 59% 10-16-05 19:04 IDAPI32.CFG
------- ------- --- --------
33855 13146 62% 3

Hope it helps.

.....mandy
Attached Files
File Type: zip idapi.zip (13.1 KB, 770 views)
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: Oct 2005
Posts: 12
Mandy,

Thanks a lot!!

I will surely check the files you've sent me and see if I get any progress.
I will report back to you as soon as I'm done testing your files.

As a matter of fact, I tried reading the file as a text (and as a binary) file using c++ in order to check what were those weird seperators, but after a little research the seperators seemed to be different from parameter to parameter (as weird as that may sound). I didn't do any further research on this subject due to lack of time, but now with your help I'm pretty sure I'll get some progress.

Yet Again,
Thanks!

-Mor
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: Oct 2005
Posts: 12
Thanks to Mandy's source file I managed to understand the format of the Idapi32.cfg. now I only need to write the code that makes the change - not much of a biggie.

If anyone ever encounters the same situation here is the syntax (to be used in a programming language of your desire
char(0) or in other words NULL seperates between one text/char to another (in example: "HELLOchar(0).char(0)WoRlD" is actually 'HELLO','.','WoRlD')
char(1) means that a parameter is to be followed
char(2) symbols an end to the current block
char(3) symbols a new line (seperates between definitions)
char(4) means equality or the '=' sign
the rest of the chars remain the same.

Hope this helps!
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: Oct 2005
Posts: 6
pyrocks wrote: "If anyone ever encounters the same situation here is the syntax (to be used in a programming language of your desire"

Glad it was helpful. And thanks in turn for summarizing the syntax in plain text. It may come in handy as the conversion project I'm working on progresses.

.....mandy
Reply With Quote
  #7 (permalink)  
Old
Registered User
 
Join Date: Aug 2003
Location: Bologna - Italy
Posts: 209
In my opinion, you should NOT modify directly the idapi32.cfg file, since it's not necessary at all.

You're surely in one of these two different cases:

a) you're modifying an application for which you've got the paradox/other source code
b) you're adding a pdox/other bde application which is completely separate from the other apps using bde

If, as i argue, the app you're adding is completely separate from the others, it SHOULD SURELY use a different idapi32.cfg, and if it's not so it's a badly written application; since each app using the bde can and should have its own bde configuration, an app which uses the shared idapi32.cfg and cannot modify it by herself, it's badly written.

That's my opinion!
__________________
The only failure is not trying to do it.
Reply With Quote
  #8 (permalink)  
Old
Registered User
 
Join Date: Jul 2010
Posts: 1
Hi everyone, I wrote a command-line program to manage binary BDE configuration files: idapi32cfg.

I hope you'll find it useful.
Reply With Quote
  #9 (permalink)  
Old
Registered User
 
Join Date: Aug 2003
Location: Bologna - Italy
Posts: 209
to aoboroc: Thanks very much!

This is just the tool that totally simplifies my work!
Thanks again for making it open source.
__________________
The only failure is not trying to do it.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On