Run-Time Dynamic Linking problem

I am trying to load a DLL at runtime and get the address of exported
functions using GetProcAddress/LoadLibrary.  I have produced some code to do
this, but I get compiler error C2106 (left operand must be l-value).  The
odd thing is that I only get this compiler error on my functions that accept
1 or more parameters.  My function pointers that have no arguments do not
generate this compiler error.  I would like to understand why the compiler
is generating this error for my functions that have parameters and how to
fix it.

Here is a small excerpt from the header file defining the exported
functions:
--------
#define GSMTOOLEXP extern "C"
#ifdef STATICLIB
#define GSMTOOLEXP extern "C"
#define GSMTOOLAPI
#else
#ifdef BUILDDLL
#define  GSMTOOLEXP extern "C" __declspec(dllexport)
#else
#define  GSMTOOLEXP extern "C" __declspec(dllimport)
#endif
#define  GSMTOOLAPI WINAPI
#endif

// I don't have BUILDDLL or STATICLIB defined (this must've been defined in
the source code to the DLL which I don't have)

GSMTOOLEXP BOOL GSMTOOLAPI SetupWWANToolKit();
GSMTOOLEXP BOOL GSMTOOLAPI SetModemEventReporting( HWND pParent = NULL , int
CallbackNumber = 0 );

// Do I need to do anything extraordinary to deal with C++ default
parameters?


Here is a small excerpt from my source code trying to dynamically link in
these functions:
-------
typedef BOOL (*SETUPWWANTOOLKIT)(void);
typedef BOOL (*SETMODEMEVENTREPORTING)(HWND, int);

SETUPWWANTOOLKIT      pSetupWWANToolKit = NULL;
SETMODEMEVENTREPORTING   pSetModemEventReporting = NULL;

HINSTANCE hWWANToolkit = NULL;

 hWWANToolkit = (HINSTANCE)LoadLibrary(_T("WWANToolkit.dll"));
 if (hWWANToolkit != NULL)
 {
  //TODO: load the function pointers
   (FARPROC)pSetupWWANToolKit = GetProcAddress(hWWANToolkit,
_T("SetupWWANToolKit")); // this doesn't generate C2106
  (FARPROC)pSetModemEventReporting = GetProcAddress(hWWANToolkit,
_T("SetModemEventReporting")); // this does generate C2106
  }



0
trevor8021 (184)
5/13/2004 2:41:06 PM
vc.mfc 33608 articles. 0 followers. Follow

6 Replies
533 Views

Similar Articles

[PageSpeed] 13

Trevor wrote:

>I am trying to load a DLL at runtime and get the address of exported
>functions using GetProcAddress/LoadLibrary.  I have produced some code to do
>this, but I get compiler error C2106 (left operand must be l-value).  The
>odd thing is that I only get this compiler error on my functions that accept
>1 or more parameters.  My function pointers that have no arguments do not
>generate this compiler error.  I would like to understand why the compiler
>is generating this error for my functions that have parameters and how to
>fix it.

All the (FARPROC) casts you're using below are illegal and should generate
errors. See below for more.

>Here is a small excerpt from the header file defining the exported
>functions:
>--------
>#define GSMTOOLEXP extern "C"
>#ifdef STATICLIB
>#define GSMTOOLEXP extern "C"
>#define GSMTOOLAPI
>#else
>#ifdef BUILDDLL
>#define  GSMTOOLEXP extern "C" __declspec(dllexport)
>#else
>#define  GSMTOOLEXP extern "C" __declspec(dllimport)
>#endif
>#define  GSMTOOLAPI WINAPI
>#endif
>
>// I don't have BUILDDLL or STATICLIB defined (this must've been defined in
>the source code to the DLL which I don't have)
>
>GSMTOOLEXP BOOL GSMTOOLAPI SetupWWANToolKit();
>GSMTOOLEXP BOOL GSMTOOLAPI SetModemEventReporting( HWND pParent = NULL , int
>CallbackNumber = 0 );
>
>// Do I need to do anything extraordinary to deal with C++ default
>parameters?
>
>
>Here is a small excerpt from my source code trying to dynamically link in
>these functions:
>-------
>typedef BOOL (*SETUPWWANTOOLKIT)(void);
>typedef BOOL (*SETMODEMEVENTREPORTING)(HWND, int);
>
>SETUPWWANTOOLKIT      pSetupWWANToolKit = NULL;
>SETMODEMEVENTREPORTING   pSetModemEventReporting = NULL;
>
>HINSTANCE hWWANToolkit = NULL;
>
> hWWANToolkit = (HINSTANCE)LoadLibrary(_T("WWANToolkit.dll"));

Note that LoadLibrary returns an HMODULE, not an HINSTANCE.

> if (hWWANToolkit != NULL)
> {
>  //TODO: load the function pointers
>   (FARPROC)pSetupWWANToolKit = GetProcAddress(hWWANToolkit,
>_T("SetupWWANToolKit")); // this doesn't generate C2106
>  (FARPROC)pSetModemEventReporting = GetProcAddress(hWWANToolkit,
>_T("SetModemEventReporting")); // this does generate C2106
>  }

It's just like the error message says. When you say:

 (FARPROC) x

The result of the cast is not an lvalue, and you cannot assign to it.
Conceptually, at least, it's a temporary value which does not occupy the
same memory as x. Therefore, even if you could modify it, you wouldn't
observe your modifications in x. There are a couple of ways around this. In
C, the only way is:

 *(FARPROC*) &x

Breaking this down:

1. &x yields the address of x.
2. (FARPROC*) &x yields an rvalue containing the address of x, interpreted
as a pointer to a FARPROC.
3. *(FARPROC*) &x dereferences this rvalue, yielding an lvalue.

While the (FARPROC*) yields an rvalue of the address of x, dereferencing it
produces an lvalue, which you can assign to. In C++, you can use a reference
cast, e.g.

 (FARPROC&) x
 reinterpret_cast<FARPROC&>(x)

Reference casts yield lvalues.

-- 
Doug Harrison
Microsoft MVP - Visual C++
0
dsh (2498)
5/13/2004 5:41:43 PM
"Doug Harrison [MVP]" <dsh@mvps.org> wrote in message
news:o0c7a0hq9hjupgqedf0f4m58uivm44j71d@4ax.com...
> Trevor wrote:
>
> >I am trying to load a DLL at runtime and get the address of exported
> >functions using GetProcAddress/LoadLibrary.  I have produced some code to
do
> >this, but I get compiler error C2106 (left operand must be l-value).  The
> >odd thing is that I only get this compiler error on my functions that
accept
> >1 or more parameters.  My function pointers that have no arguments do not
> >generate this compiler error.  I would like to understand why the
compiler
> >is generating this error for my functions that have parameters and how to
> >fix it.
>
> All the (FARPROC) casts you're using below are illegal and should generate
> errors. See below for more.
>

It is interesting that the function pointers without any parameters did not
generate this compiler error.  The compiler I am using is eVC 4.0 SP3.  This
must be a bug or the compiler is changing the code around to masquerade the
error.

<snip code excerpt>

> >HINSTANCE hWWANToolkit = NULL;
> >
> > hWWANToolkit = (HINSTANCE)LoadLibrary(_T("WWANToolkit.dll"));
>
> Note that LoadLibrary returns an HMODULE, not an HINSTANCE.
>

The Windows CE.NET 4.2 help file says it returns a HINSTANCE.  Since I am
running this code on Windows CE.NET 4.2 I will go with that.

<snip code>

> It's just like the error message says. When you say:
>
>  (FARPROC) x
>
> The result of the cast is not an lvalue, and you cannot assign to it.
> Conceptually, at least, it's a temporary value which does not occupy the
> same memory as x. Therefore, even if you could modify it, you wouldn't
> observe your modifications in x. There are a couple of ways around this.
In
> C, the only way is:
>
>  *(FARPROC*) &x
>
> Breaking this down:
>
> 1. &x yields the address of x.
> 2. (FARPROC*) &x yields an rvalue containing the address of x, interpreted
> as a pointer to a FARPROC.
> 3. *(FARPROC*) &x dereferences this rvalue, yielding an lvalue.
>
> While the (FARPROC*) yields an rvalue of the address of x, dereferencing
it
> produces an lvalue, which you can assign to. In C++, you can use a
reference
> cast, e.g.
>
>  (FARPROC&) x
>  reinterpret_cast<FARPROC&>(x)
>
> Reference casts yield lvalues.
>
> -- 
> Doug Harrison
> Microsoft MVP - Visual C++
>

Thank you for your detailed explanation.  I see what was going wrong now.  I
have modified the code to look like this:

pSetupWWANToolKit = (SETUPWWANTOOLKIT)GetProcAddress(...);

I call the function like so:

(*pSetupWWANToolKit)();

It works great, thanks for your assistance.



0
trevor8021 (184)
5/13/2004 6:50:11 PM
Trevor wrote:

>It is interesting that the function pointers without any parameters did not
>generate this compiler error.  The compiler I am using is eVC 4.0 SP3.  This
>must be a bug or the compiler is changing the code around to masquerade the
>error.

It could also be a sort of anachronism, kept around for compatibility
purposes. Before C was standardized, I believe some compilers supported what
you were originally trying. MS tends to try very hard not to break existing
code with its compiler revisions, even if that means allowing things which
have since become illegal.

-- 
Doug Harrison
Microsoft MVP - Visual C++
0
dsh (2498)
5/13/2004 10:48:50 PM
The usual way of handling this is to create a typedef for the function, e.g.,

typedef int (*WhateverProc)(int, LPCTSTR);

then declare

WhateverProc whatever = (WhateverProc)GetProcAddress("whatever");

Note that it is very important to specify the argument WITHOUT _T() because GetProcAddress
accepts only 8-bit character strings, even in Unicode apps (there is no GetProcAddressA
and GetProcAddressW; there is only one form, and it requires 8-bit character strings).

You can then call the function as

int something = whatever(3, _T("This is a test"));

As far as I know, the syntax you are using is not legal C, as already pointed out. 

It seems odd to cast a function *to* a FARPROC, which is a pretty useless representation
of a function, rather that cast it *from* a FARPROC to a type that is useful.
				joe


On Thu, 13 May 2004 12:41:43 -0500, "Doug Harrison [MVP]" <dsh@mvps.org> wrote:

>Trevor wrote:
>
>>I am trying to load a DLL at runtime and get the address of exported
>>functions using GetProcAddress/LoadLibrary.  I have produced some code to do
>>this, but I get compiler error C2106 (left operand must be l-value).  The
>>odd thing is that I only get this compiler error on my functions that accept
>>1 or more parameters.  My function pointers that have no arguments do not
>>generate this compiler error.  I would like to understand why the compiler
>>is generating this error for my functions that have parameters and how to
>>fix it.
>
>All the (FARPROC) casts you're using below are illegal and should generate
>errors. See below for more.
>
>>Here is a small excerpt from the header file defining the exported
>>functions:
>>--------
>>#define GSMTOOLEXP extern "C"
>>#ifdef STATICLIB
>>#define GSMTOOLEXP extern "C"
>>#define GSMTOOLAPI
>>#else
>>#ifdef BUILDDLL
>>#define  GSMTOOLEXP extern "C" __declspec(dllexport)
>>#else
>>#define  GSMTOOLEXP extern "C" __declspec(dllimport)
>>#endif
>>#define  GSMTOOLAPI WINAPI
>>#endif
>>
>>// I don't have BUILDDLL or STATICLIB defined (this must've been defined in
>>the source code to the DLL which I don't have)
>>
>>GSMTOOLEXP BOOL GSMTOOLAPI SetupWWANToolKit();
>>GSMTOOLEXP BOOL GSMTOOLAPI SetModemEventReporting( HWND pParent = NULL , int
>>CallbackNumber = 0 );
>>
>>// Do I need to do anything extraordinary to deal with C++ default
>>parameters?
>>
>>
>>Here is a small excerpt from my source code trying to dynamically link in
>>these functions:
>>-------
>>typedef BOOL (*SETUPWWANTOOLKIT)(void);
>>typedef BOOL (*SETMODEMEVENTREPORTING)(HWND, int);
>>
>>SETUPWWANTOOLKIT      pSetupWWANToolKit = NULL;
>>SETMODEMEVENTREPORTING   pSetModemEventReporting = NULL;
>>
>>HINSTANCE hWWANToolkit = NULL;
>>
>> hWWANToolkit = (HINSTANCE)LoadLibrary(_T("WWANToolkit.dll"));
>
>Note that LoadLibrary returns an HMODULE, not an HINSTANCE.
>
>> if (hWWANToolkit != NULL)
>> {
>>  //TODO: load the function pointers
>>   (FARPROC)pSetupWWANToolKit = GetProcAddress(hWWANToolkit,
>>_T("SetupWWANToolKit")); // this doesn't generate C2106
>>  (FARPROC)pSetModemEventReporting = GetProcAddress(hWWANToolkit,
>>_T("SetModemEventReporting")); // this does generate C2106
>>  }
>
>It's just like the error message says. When you say:
>
> (FARPROC) x
>
>The result of the cast is not an lvalue, and you cannot assign to it.
>Conceptually, at least, it's a temporary value which does not occupy the
>same memory as x. Therefore, even if you could modify it, you wouldn't
>observe your modifications in x. There are a couple of ways around this. In
>C, the only way is:
>
> *(FARPROC*) &x
>
>Breaking this down:
>
>1. &x yields the address of x.
>2. (FARPROC*) &x yields an rvalue containing the address of x, interpreted
>as a pointer to a FARPROC.
>3. *(FARPROC*) &x dereferences this rvalue, yielding an lvalue.
>
>While the (FARPROC*) yields an rvalue of the address of x, dereferencing it
>produces an lvalue, which you can assign to. In C++, you can use a reference
>cast, e.g.
>
> (FARPROC&) x
> reinterpret_cast<FARPROC&>(x)
>
>Reference casts yield lvalues.

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
5/14/2004 12:39:37 AM
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
news:kv48a016jnfaq6omk9sfd6kme8nkcr87oa@4ax.com...
> The usual way of handling this is to create a typedef for the function,
e.g.,
>
> typedef int (*WhateverProc)(int, LPCTSTR);
>
> then declare
>
> WhateverProc whatever = (WhateverProc)GetProcAddress("whatever");
>
> Note that it is very important to specify the argument WITHOUT _T()
because GetProcAddress
> accepts only 8-bit character strings, even in Unicode apps (there is no
GetProcAddressA
> and GetProcAddressW; there is only one form, and it requires 8-bit
character strings).
>

For my platform, Windows CE, there is no GetProcAddressA it is
GetProcAddressW.  Hence the _T macro.

> You can then call the function as
>
> int something = whatever(3, _T("This is a test"));
>
> As far as I know, the syntax you are using is not legal C, as already
pointed out.
>
> It seems odd to cast a function *to* a FARPROC, which is a pretty useless
representation
> of a function, rather that cast it *from* a FARPROC to a type that is
useful.
> joe
>

I agree.  I see that what I was trying to do was illegal C and have fixed
it.  Thank you for your comments Joe.



0
trevor8021 (184)
5/14/2004 2:34:27 PM
It that case, _T is still inappropriate; if it is W, and there is no A, then it should be
L"whatever". _T suggests that either 8b-it or 16-bit characters are valid. You just
pointed out that 8-bit are never valid.
On Fri, 14 May 2004 10:34:27 -0400, "Trevor" <trevor@nospam.com> wrote:

>
>"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
>news:kv48a016jnfaq6omk9sfd6kme8nkcr87oa@4ax.com...
>> The usual way of handling this is to create a typedef for the function,
>e.g.,
>>
>> typedef int (*WhateverProc)(int, LPCTSTR);
>>
>> then declare
>>
>> WhateverProc whatever = (WhateverProc)GetProcAddress("whatever");
>>
>> Note that it is very important to specify the argument WITHOUT _T()
>because GetProcAddress
>> accepts only 8-bit character strings, even in Unicode apps (there is no
>GetProcAddressA
>> and GetProcAddressW; there is only one form, and it requires 8-bit
>character strings).
>>
>
>For my platform, Windows CE, there is no GetProcAddressA it is
>GetProcAddressW.  Hence the _T macro.
>
>> You can then call the function as
>>
>> int something = whatever(3, _T("This is a test"));
>>
>> As far as I know, the syntax you are using is not legal C, as already
>pointed out.
>>
>> It seems odd to cast a function *to* a FARPROC, which is a pretty useless
>representation
>> of a function, rather that cast it *from* a FARPROC to a type that is
>useful.
>> joe
>>
>
>I agree.  I see that what I was trying to do was illegal C and have fixed
>it.  Thank you for your comments Joe.
>
>

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
5/14/2004 3:44:05 PM
Reply:

Similar Artilces:

Problem inserting a node with a namespace
This is so silly I must be doing something wrong! I need to insert (using VB.NET) a new node in a DOM; node has a namespace. I first create, under programme, basic structure, starting thus: <rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:prism="http://prismstandard.org/namespaces/1.2/basic/" xmlns:pcv="http://prismstandard.org/namespaces/1.2/pcv/"> Then I attempt to add a node with rdf namespace prefix. My call in skeleton is: CreateElement("rdf", "subje...

Looking For Sales Projections Run-Off Formula
I regularly do sales run-offs where in I have an assumption of how many sales are made in a month (say 10 per month) and each customer subscribes to my services for another assumed figure (say 10 months). Currently, i do an array manually, like this, then sum the total sales for the month. Sales: Sum Sum Sum Month 1 xxxxxxxxxxxxxxx Month 2 xxxxxxxxxxxxxxxxx Month 3 xxxxxxxxxxxxxxxxxxxxx I would like to be able to "play" with the assumptions (in this case 10 sales per month with each client subscribing for 10 months) and need a formula to fill in the arra...

Opening Links from Outlook 2007
Some time ago, opening a link from an email message in OL2007 stopped working. What will work is if IE8 is closed, then the first link will open IE and the correct link. Any clicks on other links does nothing. Any ideas. P.S. It all works fine in Mozilla. Is firefox the default browser? Go into IE's Tools, Folder options and reset web settings - confirm its working then set FF as default, if desired. -- Diane Poremsky [MVP - Outlook] Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlook/ol2007/ Outlook Tips by email: d...

problem carrying over values
I have one form that has a button I''ll call it form1. The button looks at a text box for an ID and if its null it opens form2 and creates a new record in form2. If the text box is NOT null, it will go find the ID that's in the text box and filter it in form2. When the new record is created in form2, I need the ID to be put into the NULL text box in form1. I know how to do this however, if you open form2 on its own, then the error msg comes up that it can't find form1. I know why I'm getting this error, but don't know the fix for it. Is there a work around? Thanks...

Realteck 5.1 (6 channel) sound problem
Hi, I have finally got round to connecting all my speakers up to my fairly new PC. I have a Soundblaster desktop 5.1 speaker system and my new mobo, aa ASrock N68PV-GS, has 3 rear connectors for the onboard Realtek ALC662 system. I connect up my 3 cables, Front Green to Green on the mobo, middle black/blue and the centre/bass pink/orange to the mic in. The Realteck control panel objects to this mic connection. No matter what I try I get everything via the two front speakers. All is set up to 5.1 in the control panel, I have checked all my cables are well seated and in good ...

different start time different days
How can I set different start times for different days? Outlook seems to assume I work every day for the same hours, not so. I was hoping to use its shading as a visual guide for different days, but it wants all days to have the same time schedule. -- qpackard http://forums.slipstick.com Outlook doesn't handle shift work. You could make tentative appointments for the work hours to highlight them. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com/ Outlook Tips by email: ...

License Problem
I have networked two macs and purchased and installed two copies of Office:Mac (2004). I now find that my second mac is reading the license info off the first one and not allowing me access on the second one. I have uninstalled and reinstalled the software on the second mac at least a dozen times, then discovered Microsoft's instructions "Error message when you try to start an Office 2004 for Mac program: "Microsoft Office 2004 is already in use". So I followed those instructions at least a dozen times to remove the Office 2004 for Mac licensing information and it has not...

Problem with code that inspects thread context and dumps stack trace
Hi! Some years ago, I had to debug a Java application that had a deadlock problem. It wasn't so hard, because I've been told about a JVM command (now, I don't even remember how to activate it!) that dumps the status of all threads in an app, including "what they are waiting for" (locks). Now I'm in the "real" world of C++, Win32 applications and MFC (no virtual machines around!). We have many multithreaded applications: what if some bug causes a dedlock, e.g. in a test scenario? We must inspect it, and I'd like to have a tool to simplify my life. Does s...

Get registered for the new community at https://community.dynamics
Within the next few weeks you will begin to see the Microsoft Dynamics Community pages located at http://www.microsoft.com/dynamics/community, moving to a new location at https://community.dynamics.com. We are making this move in an effort to streamline the accessibility of all Microsoft Dynamics communities and make the user experience of interacting with community experts and your peers much easier. The newsgroups as you see them today will still be intact, but the web pages which you use today to access them will be different. Plus you’ll see more streamlined content and future func...

Problems adjusting to XP
I'm a moderately experienced user with two complaints: 1) I accidentally set the 'recently used file list' to zero, and I meant one. In the Options or wherever it is, now, the box is grayed out and I can't get it re-set to 1. Halp!! 2) 97% of my work is with mini-databases which I prefer to have in Excel, and the new Excel keeps reminding me and scolding me for having text labels which appear to be numbers [duh!!] And it scolds me when I sort. How can I tell Excel to stop treating me like an idjit? -- Regards, P D Sterling www.pdsterling.us 1) No Idea 2) Tools>...

cut/copy and paste forumla problem help
i am currently using the correlation formula to test on a large set of data: e.g. CORREL(IGR!C233:C262,IIA!C233:C262) IGR and IIA - they are a pair of data i place in 2 different worksheets, each has set of data, and I need to pull the data of C233 and C262 in IGR and IIA worksheet and I have many pairs in different worksheets E.G. RMR and RHR so I copy the forumla above and hope can only manually adjust the symbol from IGR and IIA to RMR and RHR when I copy it shift the number down =CORREL(IGR!C242:[/B]C271,IIA!C242:C271) from C233 to C242 and C 262 to C271 and I would have to ma...

how do I enter data from 1 spreadsheet to another many times
I have on one page the basic data in singular line form, To translate this to a more readable form I made another page in the folder into a more readable form of which I can print and use away from the computer. I would like to know how can I use the form to copy the required data without the labor intensive re-entering in each form of a new form for each line in the oringinal data sheet. is there a formula or set of instructions that will do this automatically copying the desired cell onto the new page without all of the work? I hope I have expalined myself claearly since I'm a nov...

Problems with customizing styles in the Tracking Gantt
Hi, I want to modify the appearance of critical tasks in the Tracking Gantt but somehow it doesn't work. When I open the Bar Styles dialog, I select the first row (Show for "Normal, Critical" tasks, From - Start, To - Finish). I want to change the default pattern to be tick since when I print the chart the critical tasks almost do not appear. However, when I choose another pattern nothing changes. There is another funny thing. When I double-click a particular task, I see under the Bar Text tab that it shows Baseline Duration to the left and % Complete to the right....

CRM Time Stamp issue
When I check the properties of any of my activity records, the time stamps are incorrect, my server time settings are set to GMT, as are the crm system settings. If I create two tasks one after the other the time stamps could be an hour apart. Any ideas? ...

How to see if different workbooks are linked?
How can someone determine if two workbooks are linked? I can see it is I find the cell, but is there a way to see it at a glance? Thanks, Tracy Hi Tracy You can use Edit>Links in the menubar(not in all excel versions) If it is gray there are no links -- Regards Ron de Bruin http://www.rondebruin.nl "Tracy@Saunatec" <Tracy@Saunatec@discussions.microsoft.com> wrote in message news:50853AE6-A43E-49B2-9E7B-C3C5ECF4C5A7@microsoft.com... > How can someone determine if two workbooks are linked? I can see it is I find > the cell, but is there a way to see it at a glan...

Link Error #2
I was able to use CL.exe to compile and link .cpp or .c file in a command line. But all in a sudden, I can not do this any more, as I always got such an error message: LINK : fatal error LNK1104: cannot open file 'C:\Documents' I didn't do complicated compiling. e.g. I even tested with the "hello word" thing. cl hello.c where hello.c is just this: #include <stdio.h> main() { printf("hello world!\n"); } But again, this LINK : fatal error LNK1104: cannot open file 'C:\Documents' happens too! It seems something wrong with the path that CL....

Forum Navigation Funtionality Problems
I am having great difficulty navigating the Excel forum. For example when I clicked on the forum link to "Excel general questions" IE returns the error that the page cannot be found. I have found that if I first click on an Outlook forum and gain access to it, and then click on "Excel general questions" I will gain access immediately. After posting a question to the "Excel general questions" forum, and receiving an email response, the link in the email to the thread took me to an error message that the page was not found. I then navigated manually to the f...

How do you statically link mfc42loc.dll?
I have an MFC app written in Visual C++ 6.0 Professional. It's localized, so I need to include mfc42loc.dll for the build of each language. (Mfc42loc.dll will override mfc42.dll and cause microsoft-written MFC dialogs to appear in that language.) I definitely do not want to use MFC in a shared DLL. I want to use MFC as a static library. I have mfc42loc.dll for each language. How can I make the language-appropriate mfc42loc.lib statically link into my app? Do I need to build the .lib file myself? How do I do that? Thanks. Most likely you do not. Static linking is already a bad ide...

Microsoft Dynamics CRM 3.0 with Entourage
Evening All, I currently have a client who is running 2 Apple Macs (iBook G4 & iMac Intel Core Duo). They are running SBS2003 Premium for their server and Entourage to connect to Exchange. Given that Dynamics connects so nicely into Outlook, will it work nicely with OSX & Entourage? At the moment this is about the only thing stopping me rolling it out. Regards, Greg Microsoft Dynamics CRM has no support for Mac and OSX at all. Your only option would be to have users connect to a pc from a mac and run crm that way ie a terminal session ============================== John O...

Public folders changes problem
Hi On Exchange 2007 I created public folder named "IT" and inside a calendar called "IT calnedar" that is used for all events in our IT department. It's strange when our secretary adds events into this calendar and mark them with different colors (categories) these changes (the right color for each event) are only shown in Outlook 2003 or OWA, but in Outlook 2007 all colors are mixed up. We all have Outlook 2007 in IT department, so we all see wrong colors, but when I try to log-on through OWA or with a test machine that has Outlook 2003 installed everything is O...

Please Help strange problem
Hope someone can help with this after downloading a small excel file from a dealer site that is a genereated report, I can download it as an excel file, upon doing so and pasting it into my working sheet I end up with this � with the two dots above it at the end of the text in every cell, and when it is removed some cells change for example a cell which has a long number for a serial number will shorten as well where do I start the excel version is 2000 blacklabhfxnospam@hotmail.com remove no spam ...

CRM setup problem
Installed CRM product on Win 2000 SP3, SQL 2000 SP2 box. Install seems to have gone well. Later following reboot, when I brought up the CRM client in web browser mode, none of the drop down lists work on any of the pages like System Options or User Options. I get web page errors saying CLASS NOT REGISTERED. How can I correct this? I am able to do other things in the web client like add users, business units etc, just nothing that requires using a drop down list. ...

run client program when the system is on
Dear I have no more knowledge about VC.......I did a client-server programming by using Dialog based application.. ....It is working very well..But I need to run client part when the system is on........That i want to run client as service.... But I dont know about the coding of service.Sir,plz help me.....If there is any code to help run as service.I got some code.But I dont know how to use in my project. Rewrite it so it has absolutely no GUI component at all, and conforms to the protocols for being a service. A dialog-based app is remarkably ill-suited for being a service. Fundamentally,...

Running balance in bank account suddenly wrong!
We went to enter todays transactions into a bank account, and noticed that the running balance was wrong by ~$250 :-| After *hours* of investigation it looks like the 'starting balance' for this account was now ~$250 higher than should have been! We have been on Money since 2001, and when we upgraded to 2004, we archived 2001 - 2002. When we upgraded to 2005 we archived 2003. We can't tell why M2005 *suddenly* decided that the starting balance was wrong, but this cast serious doubt on M2005 reliablity. Has anyone else had this problem? Beware people, beware! ...

OWA Calendar problem
Our orginization is using Exchange Server 2003 1 -backend 2 -Front end servers. We are experiencing an sproradic issues with calendar updates. The owner of a meeting will issue an update to a meeting it will update the calendar in the Outlook Client but will not update in OWA. Any help or ideas would be greatly appreciated "=?Utf-8?B?QmVuIFNoaXZlbHk=?=" <BenShively@discussions.microsoft.com> wrote in news:CBC4CF1E-DC5C-4DC7-A388-7ED964DDD270@microsoft.com: > Our orginization is using Exchange Server 2003 1 -backend 2 -Front end > servers. We are experiencing an spr...