|
|
Hi,
I am using the List control and populating data coming as resultset into Dialog list.One of the field should be checkbox which work based on condition. If condition is true then only show the checkbox otherwise hide the checkbox.So some row have check box and rest don't. Could you please suggest way to achieve it. I tried to paint unwanted check box but it start showing when someone click on hidden checkbox. Appreciate you time.
Thanks
Pankaj
|
|
|
|
|
use GetDlgItem(ID_OF_CHECKBOX)->ShowWindow(SW_HIDE)
HTH
|
|
|
|
|
Whenever I am getting the ID list not the checkbox.
|
|
|
|
|
Hi all
in my application some time print function not working.
i m calling this for print
//CView::OnFilePrint();
and for preview
//CView::OnFilePrintPreview();
but some times when i colling these function these not responded.
nothing is happen there,than if i restart the machine its working fine.
please provide me help for this.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Le@rner wrote: i m calling this for print
//CView::OnFilePrint();
and for preview
//CView::OnFilePrintPreview();
Those are not functions that you call directly. You implement them so that the framework can call them as needed. See Technical Note 30 for more.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
In addition to David Crow's answer, there are much more things going on than just calling the functions.
You also have OnPreparePrinting , OnPrepareDC and many other things working in a depper part, that you don't code directly.
If you need to restart your machine in order to make it working another time, one cause could be a bad use of CDC, so it gets problems and it doesn't work until the OS is started another time.
I strongly recommend you to go step by step in printing, there is a lot of things to consider and that can give problems. Here in codeproject you can find some very good articles about printing, take a look on them.
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
actully i m already taking help of this article
[]Another ListView print (preview) sample.[^]
please help me for this.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
With the information you have given is almost impossible to help you.
you should give more details, debugging your application and seeing what happens when it hangs, putting a bit of code...
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
HI all
please tell me is this possible to hide vertical scrollbar from printpreview window in mfc.
please provide me help and guidance regarding this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hi All,
Please Help me with this issue.
How to access the balloon tooltip that comes when a device is connected to the system? I need to change the caption of that dialog.
Iam using VS 2005
Regards,
Spk
modified on Wednesday, December 30, 2009 10:47 PM
|
|
|
|
|
int main()
{
printf("Enter 0 or 1 :");
scanf("%d",&i_choice);
if ( i_choice ==0 )
for( ;i_count_1 < i_number;)
{-------
------
}
if (choice == 1)
for( ;i <= i_number;)
{-------
------
}
Here I raed a user input ( 0 or 1)
So as per i/p I've to change the condition in my for loop.
if choice ==1 the condition must be (i <= i_number)
if choice == 0 the condition must be (i_count_1 < i_number)
I don't know how to use #define with this program.
anybody can help me....
Krish
|
|
|
|
|
You don't need #define in your code sample, but you need a switch(i_choice) .
Maxwell Chen
|
|
|
|
|
here I wanna reduce the code size....
swith(i_choice) {
case 0 :
for (.. ; condition 1 ; ..)
{
}
break;
case 1 :
for (.. ; condition 2 ; ..)
{
}
break;
}
So the code will come twise ; except the conditions in for loop all other statements are same for case 1 and 0. That's why I tried for a #define Macro. ????
with regards
Krish
|
|
|
|
|
krish_kumar wrote: case 0 :
for (.. ; condition 1 ; ..)
Then could you show the complete code (I mean those ... portions)? I will figure out a solution for you.
Maxwell Chen
|
|
|
|
|
krish_kumar wrote: That's why I tried for a #define Macro. ????
Which would be totally wrong. The #define directive is handled by the preprocessor before the compile phase. You don't know the value of i_choice until the code is running. See the problem?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Okkk... I realize I can't use a #define here....
But my code is repeating twice ...I wanna avoid that....
Except condition the other statements are same for both...
Here is my code
printf("\n U wanna find prime nos up to N(press 1)
or N prime nos (press 0 ");
scanf("%d",&i_choice);
switch(i_choice) {
case 0 :
for (i = 1, i_count = 0; i_count_1 < i_number; i++ ) {
for (j = 1,i_count = 0; j <= i ; j++) {
if ((i % j) == 0)
++i_count;
}
if (i_count <= 2) {
printf("\t %d \n",i);
i_count_1++;
}
}
break;
case 1 :
for (i = 1, i_count = 0 ; i <= i_number; i++ ) {
for (j = 1, i_count = 0; j <= i ; j++) {
if( (i % j)==0 )
++i_count;
}
if (i_count <= 2) {
printf("\t %d \n",i);
i_count_1++;
}
}
}
}
|
|
|
|
|
 I would suggest you to re-design your code architecture. See the sample code below.
#include <iostream>
int GetNextPrime(int iStartNum)
{
int i, j;
int i_count;
for(i = iStartNum; ; i++) {
for(j = 1, i_count = 0; j <= i ; j++) {
if( (i % j) == 0 )
++i_count;
}
if(i_count <= 2) {
return i;
}
}
return 0;
}
void main()
{
int i_choice;
int i_count;
int i_count_1 = 0;
int i_number = 10;
int i, j;
int iValNow;
int count;
printf("Find prime nos up to %d (press 1), or %d prime nos (press 0) ", i_number, i_number);
scanf("%d", &i_choice);
printf("\n My version: \n");
switch(i_choice)
{
case 0 :
for(i = 0, iValNow = i, count = 0; count < i_number; i++, count++) {
iValNow = GetNextPrime(iValNow +1);
printf("\t %d \n", iValNow);
}
break;
case 1 :
for(iValNow = 0; ; ) {
iValNow = GetNextPrime(iValNow +1);
if(iValNow > i_number) {
break;
}
printf("\t %d \n", iValNow);
}
break;
}
printf("\n Your version: \n");
switch(i_choice)
{
case 0 :
for(i = 1, i_count = 0; i_count_1 < i_number; i++ ) {
for(j = 1,i_count = 0; j <= i ; j++) {
if( (i % j) == 0 )
++i_count;
}
if(i_count <= 2) {
printf("\t %d \n",i);
i_count_1++;
}
}
break;
case 1 :
for(i = 1, i_count = 0 ; i <= i_number; i++ ) {
for(j = 1, i_count = 0; j <= i ; j++) {
if( (i % j) == 0 )
++i_count;
}
if(i_count <= 2) {
printf("\t %d \n",i);
i_count_1++;
}
}
}
}
Maxwell Chen
|
|
|
|
|
krish_kumar wrote: But my code is repeating twice ...I wanna avoid that....
No problem. Just put the common code in a function.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi.
I have the following compiler error. The project was once Visual Studio 2003 and it compiled successfully without any problems and worked without a problem. I tried upgrading to Visual Studio 2005, using it's converter. I made one or two changes to get the code to compile and then I get the following problem. The Runtimes are all identical. All are Multi-threads. That has been checked. I´m really really stuck. Can someone please please help me?
Generating Code...
Compiling...
source.c
Compiling resources...
Linking...
uafxcw.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in LIBCMT.lib(dllmain.obj)
uafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.lib(new.obj)
uafxcw.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in LIBCMT.lib(delete.obj)
uafxcw.lib(afxmem.obj) : error LNK2005: "void * __cdecl operator new[](unsigned int)" (??_U@YAPAXI@Z) already defined in LIBCMT.lib(new2.obj)
uafxcw.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) already defined in LIBCMT.lib(delete2.obj)
Library.lib(Export.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(Export.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(Key.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(Key.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(StdAfx.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(StdAfx.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(NameChange.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(NameChange.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(mbConst.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(mbConst.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(Tools.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(Tools.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(OpenedFile.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(OpenedFile.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(ReaderIO.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(ReaderIO.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(WriterIO.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(WriterIO.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(DiskIO.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(DiskIO.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(Data.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(Data.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(DiskSv.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(DiskSv.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(DBSFB.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(DBSFB.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(KCriticalSection.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(KCriticalSection.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(CallbackWnd.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(CallbackWnd.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(KWinThread.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(KWinThread.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(debug_tools.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(debug_tools.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(mbDrvLib.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(mbDrvLib.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(fReadC.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(fReadC.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(mbNameChange.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(mbNameChange.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(DataVerifyer.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(DataVerifyer.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(mbReaderIO.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(mbReaderIO.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(mbOpenedFile.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(mbOpenedFile.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(TBase.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(TBase.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(MDB.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(MDB.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(mbIOcSFB.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(mbIOcSFB.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(mbCDBC.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(mbCDBC.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(KFile.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(KFile.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(ThreadESAR.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(ThreadESAR.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(mbASPI.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(mbASPI.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(mbSPTI.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(mbSPTI.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(mbDBCache.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(mbDBCache.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(Decoder.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(Decoder.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(EDD2Analyzer.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(EDD2Analyzer.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(mbFCLib.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(mbFCLib.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(mbCache.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(mbCache.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(mbFCSFB.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(mbFCSFB.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Library.lib(EDDcfFile.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in atls.lib(atltrace.obj)
Library.lib(EDDcfFile.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in atls.lib(atlbase.obj)
Creating library Release/library.lib and object Release/library.exp
library.exp : warning LNK4070: /OUT:library.DLL directive in .EXP differs from output filename '../Release/library.dll'; ignoring directive
Library.lib(mbFCSFB.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Library.lib(mbDBCache.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Library.lib(Debug.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Library.lib(EDD2.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Library.lib(mbFCLib.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Library.lib(TBase.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Library.lib(MDB.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Library.lib(mbIOcSFB.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Library.lib(mbCDBC.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Library.lib(fReadC.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Library.lib(mbNameChange.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Library.lib(mbReaderIO.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Library.lib(mbOpenedFile.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Library.lib(Data.obj) : error LNK2019: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ) referenced in function "public: class std::basic_string,class std::allocator > & __thiscall std::basic_string,class std::allocator >::ESAR(unsigned int,unsigned int)" (?ESAR@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z)
Library.lib(DiskSv.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Library.lib(DBSFB.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Library.lib(mbDrvLib.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xran(void)const " (?_Xran@_String_base@std@@QBEXXZ)
Library.lib(mbFCSFB.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
Library.lib(mbDBCache.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
Library.lib(Decoder.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
Library.lib(EDD2Analyzer.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
Library.lib(mbFCLib.obj) : error LNK2019: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ) referenced in function _$E1
Library.lib(TBase.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
Library.lib(MDB.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
Library.lib(mbIOcSFB.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
Library.lib(mbCDBC.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
Library.lib(fReadC.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
Library.lib(mbNameChange.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
Library.lib(mbReaderIO.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
Library.lib(mbOpenedFile.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
Library.lib(Data.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
Library.lib(DiskSv.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
Library.lib(DBSFB.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
Library.lib(mbDrvLib.obj) : error LNK2001: unresolved external symbol "public: void __thiscall std::_String_base::_Xlen(void)const " (?_Xlen@_String_base@std@@QBEXXZ)
../../Release/library.dll : fatal error LNK1120: 2 unresolved externals
Can someone help me please?
|
|
|
|
|
Hummmm... strange
I am guessing that you were running in debug mode under 2003, and you switch to 2005 but in relase mode. And in this mode you didn't report dependencies or library path
my 2 cents
|
|
|
|
|
Ok thanks. How do I check all of that?
|
|
|
|
|
I' m trying to get a solid grasp on the whole KMDF. The reason for the following doesn't jump out at me immediately, can anyone explain?
When my input program sends the writefile IRP through WriteFile, my driver seems to receive 4 different IRP, 3 of which are unused. Should I be concerned about this? What exactly is happening?
Ohh and while im here, what should I do about the __drv_dispatchType(IRP_MJ_UNUSED) line before my mem_Unused declaration? I just made up IRP_MJ_UNUSED...
DRIVER SRC: (snippet)
DRIVER_INITIALIZE DriverEntry;
DRIVER_UNLOAD DriverUnload;
__drv_dispatchType(IRP_MJ_UNUSED) DRIVER_DISPATCH mem_Unused;
__drv_dispatchType(IRP_MJ_WRITE) DRIVER_DISPATCH mem_Write;
NTSTATUS mem_Write(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
DbgPrint("Write IRP Received\n");
Irp->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest(Irp, IO_NO_INCREMENT );
return STATUS_SUCCESS;
}
NTSTATUS mem_Unused(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp )
{
DbgPrint("Un-used IRP Received\n");
Irp->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest(Irp, IO_NO_INCREMENT );
return STATUS_NOT_SUPPORTED;
}
INTERFACE INPUT: (snippet)
hFile = CreateFile(L"\\\\.\\Meminterface", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if ( hFile == INVALID_HANDLE_VALUE )
{
printf("FAILED, last error:%i\n",GetLastError());
}
else
{
WriteFile(hFile, "Hello from user mode!", sizeof("Hello from user mode!"), &dwReturn, NULL);
DEBUG OUTPUT:
Un-used IRP Received
Write IRP Received
Un-used IRP Received
Un-used IRP Received
|
|
|
|
|
You might try asking this in the "Hardware and Devices" forum.
What type of driver have you declared yourself to be? A good thing to do is to get the tools from OSR Online, especially the IRP viewer. Very good!!
Judy
Be wary of strong drink. It can make you shoot at tax collectors - and miss.
Lazarus Long, "Time Enough For Love" by Robert A. Heinlein
|
|
|
|
|
Hi,
Is there any way to execute XQuery through MFC Code, I know How to use MSXML.DLL to load xml documents and navigate the XML document But I am looking for a method like ExecuteSQL("") to execute my XQuery statements?
I am in need of knowing that But I can't find anything
|
|
|
|