I'm compiling a dll that imports msado15.dll.
When I'm using Windows in English, the msado15.dll is located at
<drive>:\Program Files\Common Files\System\ADO\msado15.dll". When using
Windows in Portuguese, the msado15.dll is located at <drive>:\Arquivos
de programas\Arquivos comuns\System\ADO\msado15.dll
I'd know if exists some preprocessor directive that could identify the
language of Windows and import msado15.dll from the correct path. For
example, suppose that WIN_ENG return the language of Windows, like
this:
#if WIN_ENG
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" \
rename("EOF", "ADOEOF")
#else
#import "C:\Arquivos de programas\Arquivos
comuns\System\ADO\msado15.dll" \
rename("EOF", "ADOEOF")
#endif
Is there something that I can use?
thanks in advance 6 2227
2112 wrote:
I'm compiling a dll that imports msado15.dll.
When I'm using Windows in English, the msado15.dll is located at
<drive>:\Program Files\Common Files\System\ADO\msado15.dll". When using
Windows in Portuguese, the msado15.dll is located at <drive>:\Arquivos
de programas\Arquivos comuns\System\ADO\msado15.dll
I'd know if exists some preprocessor directive that could identify the
language of Windows and import msado15.dll from the correct path.
2112:
Take a look at SHGetSpecialFolderPath().
David Wilkinson
Ok, but it's a function, not a preprocessor directive
David Wilkinson escreveu:
2112 wrote:
I'm compiling a dll that imports msado15.dll.
When I'm using Windows in English, the msado15.dll is located at
<drive>:\Program Files\Common Files\System\ADO\msado15.dll". When using
Windows in Portuguese, the msado15.dll is located at <drive>:\Arquivos
de programas\Arquivos comuns\System\ADO\msado15.dll
I'd know if exists some preprocessor directive that could identify the
language of Windows and import msado15.dll from the correct path.
2112:
Take a look at SHGetSpecialFolderPath().
David Wilkinson
"2112" <vc*******@gmail.comwrote in message
news:11**********************@s80g2000cwa.googlegr oups.com...
I'm compiling a dll that imports msado15.dll.
When I'm using Windows in English, the msado15.dll is located at
<drive>:\Program Files\Common Files\System\ADO\msado15.dll". When using
Windows in Portuguese, the msado15.dll is located at <drive>:\Arquivos
de programas\Arquivos comuns\System\ADO\msado15.dll
I'd know if exists some preprocessor directive that could identify the
language of Windows and import msado15.dll from the correct path. For
example, suppose that WIN_ENG return the language of Windows, like
this:
#if WIN_ENG
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" \
rename("EOF", "ADOEOF")
#else
#import "C:\Arquivos de programas\Arquivos
comuns\System\ADO\msado15.dll" \
rename("EOF", "ADOEOF")
#endif
Is there something that I can use?
thanks in advance
One solution (in general, not recommended due to version updates, but may be
valid in this case) could be to maintain a copy of msado15.dll in the
project directory for to import tlb data from there.
BTW, I have the same problem by with spanish/english versions of Windows ;-)
Regards
--
Cholo Lennon
Bs.As.
ARG
2112 wrote:
When I'm using Windows in English, the msado15.dll is located at
<drive>:\Program Files\Common Files\System\ADO\msado15.dll". When using
Windows in Portuguese, the msado15.dll is located at <drive>:\Arquivos
de programas\Arquivos comuns\System\ADO\msado15.dll
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" \
rename("EOF", "ADOEOF")
What you could try is just write
#import "msado15.dll"
and add the respective path for every VC installation under the VC
installation-wide settings (as opposed to the project specific settings)
under Options | Directories| Executable Files. I believe #import follows
this path. (Add a comment to the #import line then.)
What you could try alternatively is #import via progid or libid instead
of the explicit DLL.
2112 wrote:
Ok, but it's a function, not a preprocessor directive
2112:
Oops, sorry, didn't read your post properly. I'll try again:
Can you not, on each machine, just put the appropriate path in the list
of executable directories in the VC settings? Then you can just write
#import <msado15.dll>
David Wilkinson
I solved the problem adding the macro $(CommonProgramFiles) in the
Addictional Include Directories of project properties
C/C++ -General -Additional Include Directories.
and changing that #import directive for this:
#import "System\ADO\msado15.dll" \
rename("EOF", "ADOEOF")
This worked fine for me.
Thank you all.
David Wilkinson escreveu:
2112 wrote:
Ok, but it's a function, not a preprocessor directive
2112:
Oops, sorry, didn't read your post properly. I'll try again:
Can you not, on each machine, just put the appropriate path in the list
of executable directories in the VC settings? Then you can just write
#import <msado15.dll>
David Wilkinson
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Boris Kuznetsov |
last post by:
This occurs in an empty project when I add the following string:
#using <mscorlib.dll>
Can anyone tell me why would #using ... not be working???? MSDN says nothing
about this error.
Please...
|
by: Nalla |
last post by:
Hi,
I want a program. It should be a command line one. you can input the
path of a folder(preferably) or a file...it should count the no. of
lines between the compiler directives,
ifdef win32 and...
|
by: Trying_Harder |
last post by:
Is it possible to redefine a macro with global scope after
undefining it in a function? If yes, could someone explain
how?
/If/ my question above isn't very clear you can refer to
the...
|
by: Chris Croughton |
last post by:
Is the following code standard-compliant, and if so what should it do?
And where in the standard defines the behaviour?
#include <stdio.h>
#define DEF defined XXX
int main(void)
{
int...
|
by: Jim Heavey |
last post by:
I am trying to figure out the @Assembly directive.
I have an application which uses "codebehind" and only uses source code,
so I
am using the "src=" option of the @Page directive. So I have...
|
by: Jeff |
last post by:
Hi -
I'm trying to get my ASP.NET pages to work the same way on my development
machine (running from the VS.NET IDE) and on a remote (3rd-party) server.
The only way I've been able to come up...
|
by: olivier.grant |
last post by:
Hi All,
I'm trying to define a macro that will allow me to write the following
code :
#include MY_MACRO( NAME, SPACE )
and end up with the following preprocessed code :
#include NAME.hpp
|
by: Sam of California |
last post by:
Is it accurate to say that "the preprocessor is just a pass in the parsing
of the source file"?
I responded to that comment by saying that the preprocessor is not just a
pass. It processes...
|
by: vippstar |
last post by:
Is this a valid implementation of stdio.h?
-- stdio.h --
#ifndef __STDIO_H
#define __STDIO_H
/* all the necessary declarations etc */
void __dummy(void);
void __dummy(void) { return;...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
| |