|
Hi All,
I am using the Windows API to enumerate the certificate installed in the 'MY' store. In this process, i am able to enumerate the certificates installed in the smart card also. I am looking for an API which would differentiate whether the certificate is within the samrt card container or in the machine itself.
Your time and help will be appreciated. Thanks in advance.
Sunil
|
|
|
|
|
Hello Frriends
"MSVCRT.lib(chkstk.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'"
This Linker error really frustrates me and i googling a lot but didnt find any relevant suggestion.Can Anybody suggests me here , how to overcome this error....
i am Trying to compile my project (that works fine for 32 bit) to make it compatible for 64-bit OS. For That I change the Setting as "Build -> Configuration Manager -> x64|Debug". I am using MS Vs2005(VC++)
...Sorry friends if ii make any silly mistake..
is there any other way to make a project 64 bit compatible.....
|
|
|
|
|
Do you have #include<iostream.h> in your code ? If yes, try #include<iostream> instead.
|
|
|
|
|
Thankx Malli!!
After Adding "iostream.h"
i got 42 errors as can u tell me what is it
Linking...
LINK : warning LNK4076: invalid incremental status file '.\Debug/eSLogOn.ilk'; linking nonincrementally
Creating library .\Debug/eSLogOn.lib and object .\Debug/eSLogOn.exp
eSLogOn.obj : error LNK2001: unresolved external symbol _RTC_Shutdown
GENERAL.obj : error LNK2001: unresolved external symbol _RTC_Shutdown
main.obj : error LNK2019: unresolved external symbol _RTC_Shutdown referenced in function "void __cdecl CreateScanLogoWindow(void)" (?CreateScanLogoWindow@@YAXXZ)
eSLogOn.obj : error LNK2001: unresolved external symbol _RTC_InitBase
GENERAL.obj : error LNK2019: unresolved external symbol _RTC_InitBase referenced in function Probe_GetFileAttributesEx
main.obj : error LNK2001: unresolved external symbol _RTC_InitBase
GENERAL.obj : error LNK2019: unresolved external symbol _RTC_CheckStackVars referenced in function Emulate_GetDiskFreeSpaceEx
main.obj : error LNK2001: unresolved external symbol _RTC_CheckStackVars
GENERAL.obj : error LNK2001: unresolved external symbol __GSHandlerCheck
main.obj : error LNK2001: unresolved external symbol __GSHandlerCheck
GENERAL.obj : error LNK2019: unresolved external symbol __security_cookie referenced in function Emulate_GetLongPathName
main.obj : error LNK2001: unresolved external symbol __security_cookie
GENERAL.obj : error LNK2019: unresolved external symbol __security_check_cookie referenced in function Emulate_GetLongPathName
main.obj : error LNK2001: unresolved external symbol __security_check_cookie
GENERAL.obj : error LNK2001: unresolved external symbol __CxxFrameHandler3
main.obj : error LNK2001: unresolved external symbol __CxxFrameHandler3
GENERAL.obj : error LNK2001: unresolved external symbol __GSHandlerCheck_SEH
GENERAL.obj : error LNK2019: unresolved external symbol _RTC_UninitUse referenced in function "int __cdecl UrlCompare(char *,char *)" (?UrlCompare@@YAHPEAD0@Z)
GENERAL.obj : error LNK2001: unresolved external symbol __GSHandlerCheck_EH
main.obj : error LNK2001: unresolved external symbol __GSHandlerCheck_EH
main.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl CxMemFile::Close(void)" (?Close@CxMemFile@@UEAA_NXZ)
main.obj : error LNK2001: unresolved external symbol "public: virtual unsigned __int64 __cdecl CxMemFile::Read(void *,unsigned __int64,unsigned __int64)" (?Read@CxMemFile@@UEAA_KPEAX_K1@Z)
main.obj : error LNK2001: unresolved external symbol "public: virtual unsigned __int64 __cdecl CxMemFile::Write(void const *,unsigned __int64,unsigned __int64)" (?Write@CxMemFile@@UEAA_KPEBX_K1@Z)
main.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl CxMemFile::Seek(long,int)" (?Seek@CxMemFile@@UEAA_NJH@Z)
main.obj : error LNK2001: unresolved external symbol "public: virtual long __cdecl CxMemFile::Tell(void)" (?Tell@CxMemFile@@UEAAJXZ)
main.obj : error LNK2001: unresolved external symbol "public: virtual long __cdecl CxMemFile::Size(void)" (?Size@CxMemFile@@UEAAJXZ)
main.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl CxMemFile::Flush(void)" (?Flush@CxMemFile@@UEAA_NXZ)
main.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl CxMemFile::Eof(void)" (?Eof@CxMemFile@@UEAA_NXZ)
main.obj : error LNK2001: unresolved external symbol "public: virtual long __cdecl CxMemFile::Error(void)" (?Error@CxMemFile@@UEAAJXZ)
main.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl CxMemFile::PutC(unsigned char)" (?PutC@CxMemFile@@UEAA_NE@Z)
main.obj : error LNK2001: unresolved external symbol "public: virtual long __cdecl CxMemFile::GetC(void)" (?GetC@CxMemFile@@UEAAJXZ)
main.obj : error LNK2001: unresolved external symbol "public: virtual char * __cdecl CxMemFile::GetS(char *,int)" (?GetS@CxMemFile@@UEAAPEADPEADH@Z)
main.obj : error LNK2001: unresolved external symbol "public: virtual long __cdecl CxMemFile::Scanf(char const *,void *)" (?Scanf@CxMemFile@@UEAAJPEBDPEAX@Z)
main.obj : error LNK2019: unresolved external symbol "public: __cdecl CxMemFile::CxMemFile(unsigned char *,unsigned long)" (??0CxMemFile@@QEAA@PEAEK@Z) referenced in function "public: void __cdecl CxMemFile::`default constructor closure'(void)" (??_FCxMemFile@@QEAAXXZ)
main.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl CxMemFile::~CxMemFile(void)" (??1CxMemFile@@UEAA@XZ) referenced in function "public: virtual void * __cdecl CxMemFile::`scalar deleting destructor'(unsigned int)" (??_GCxMemFile@@UEAAPEAXI@Z)
main.obj : error LNK2019: unresolved external symbol "public: bool __cdecl CxImage::Destroy(void)" (?Destroy@CxImage@@QEAA_NXZ) referenced in function "public: virtual __cdecl CxImage::~CxImage(void)" (??1CxImage@@UEAA@XZ)
main.obj : error LNK2019: unresolved external symbol "public: bool __cdecl CxImage::DestroyFrames(void)" (?DestroyFrames@CxImage@@QEAA_NXZ) referenced in function "public: virtual __cdecl CxImage::~CxImage(void)" (??1CxImage@@UEAA@XZ)
main.obj : error LNK2019: unresolved external symbol "public: __cdecl CxImage::CxImage(unsigned long)" (??0CxImage@@QEAA@K@Z) referenced in function "public: void __cdecl CxImage::`default constructor closure'(void)" (??_FCxImage@@QEAAXXZ)
main.obj : error LNK2019: unresolved external symbol "public: __cdecl CxImage::CxImage(class CxImage const &,bool,bool,bool)" (??0CxImage@@QEAA@AEBV0@_N11@Z) referenced in function "public: void __cdecl CxImage::`copy constructor closure'(class CxImage &)" (??_OCxImage@@QEAAXAEAV0@@Z)
main.obj : error LNK2019: unresolved external symbol "public: long __cdecl CxImage::Draw(struct HDC__ *,long,long,long,long,struct tagRECT *,bool)" (?Draw@CxImage@@QEAAJPEAUHDC__@@JJJJPEAUtagRECT@@_N@Z) referenced in function "__int64 __cdecl WndProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?WndProc@@YA_JPEAUHWND__@@I_K_J@Z)
main.obj : error LNK2019: unresolved external symbol "public: bool __cdecl CxImage::LoadResource(struct HRSRC__ *,unsigned long,struct HINSTANCE__ *)" (?LoadResource@CxImage@@QEAA_NPEAUHRSRC__@@KPEAUHINSTANCE__@@@Z) referenced in function "__int64 __cdecl WndProc(struct HWND__ *,unsigned int,unsigned __int64,__int64)" (?WndProc@@YA_JPEAUHWND__@@I_K_J@Z)
.\Debug/eSLogOn.dll : fatal error LNK1120: 31 unresolved externals
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 8.00.50727
Copyright (C) Microsoft Corporation. All rights reserved.
Build log was saved at "file://e:\source\MyVcPrjs\cximage600_full\eSLogOn\x64\Debug\BuildLog.htm"
eSLogOn - 42 error(s), 1 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
|
|
|
|
|
I had asked to remove iostream.h include, and put <iostream> instead. Try that out. The other possibility is you are not able to link with msvcprtd.lib. Check whether the path for msvcprtd.lib is included into the project settings. Search for the lib, and make sure the paths are there in include directory.
Probably
\Program Files\Microsoft Visual Studio 8\VC\lib
\Program Files\Microsoft Platform SDK\ (SDK Folder)
for AMD64.
|
|
|
|
|
Seems you're application is targeted to run under 64-bit environment.
Please put $:\Program Files\Microsoft SDK\Lib\IA64 (AMD64) in the top of lib directories. (Tools->Options->VC++ Directories).
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Thankx Sarath
after Changing the settings as u said i got the following error
LINK : warning LNK4076: invalid incremental status file '.\Debug/eSLogOn.ilk'; linking nonincrementally
version.lib(VERSION.dll) : fatal error LNK1112: module machine type 'IA64' conflicts with target machine type 'x64'
|
|
|
|
|
Try the other folder amd64. In my understanding x86 actually renamed to AMD64.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
I am currently trying to get the bitarray of bitmap that has already been loaded into a picture box of a dialog window when I press a button on the dialog.
The overall aim is, Button 1 takes data from user, takes editing parameters and creates a BMP from it the result of the editing , putting the BMP into a picture box in a dialog. Button 2 is the "save" feature, which allows the final changed Bitmap to be saved back into bitmapbits array.
Here's the problem:
void CProjectDlg::OnButton2Press()
{
CFile TestFile;
HBITMAP CapturedBMP = m_PicBox.GetBitmap();
CBitmap RS232BMP;
RS232BMP.Attach(CapturedBMP);
BITMAP TempBMStore;
RS232BMP.GetBitmap(&TempBMStore);
BYTE* bmpBuffer=(BYTE*)GlobalAlloc(GPTR, TempBMStore.bmWidthBytes*TempBMStore.bmHeight);
DWORD dwValue=RS232BMP.GetBitmapBits(TempBMStore.bmWidthBytes*TempBMStore.bmHeight, bmpBuffer);
}
I get a valid handle at (1) but I my TempBMStore is blank after I execute line (2), meaning I do not have a valid Bitmap or something (return value is 0). What Am I doing wrong here?
When I cut and paste this code into the section of code that originally places the bitmap into the picture box, I have absolutely no problem. ie:
void CProjectDlg::OnButton1Press()
{
.
.
.
<get data="" from="" user="">
.
.
.
<edit the="" bitmap="" bit="" values="">
.
.
.
m_PicBox.SetBitmap(TmpBmp);
CFile TestFile;
HBITMAP CapturedBMP = m_PicBox.GetBitmap();
CBitmap RS232BMP;
RS232BMP.Attach(CapturedBMP);
BITMAP TempBMStore;
RS232BMP.GetBitmap(&TempBMStore);
BYTE* bmpBuffer=(BYTE*)GlobalAlloc(GPTR, TempBMStore.bmWidthBytes*TempBMStore.bmHeight);
DWORD dwValue=RS232BMP.GetBitmapBits(TempBMStore.bmWidthBytes*TempBMStore.bmHeight, bmpBuffer);
}<pre>
Thje return for line (2) is valid and I can get the bitmap bits with no errors. Same code, different behaviour. Do I need to make the Picture Box valid or something?
Thanks in advance
|
|
|
|
|
Is it possible that TmpBmp in your OnButton1Press is a local variable and when the method returns it destroys the bitmap so when you later try to access it you get an invalid handle? (CBitmap's destructor destroys the bitmap associated with it)
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Never thought of it that way. Thought the Picture box would store the data so I can retrieve it later or allow another function to operate on it.
If the data object is destroyed like that, all my functions would have to be tightly coupled together. and that would be rather wierd from an OO programming POV.
You have anyway to retrieve a bitmap from a picture box object in a dialog AFTER the function that places it there destroys the CDC that was containing it?
Jeffrey
|
|
|
|
|
Well, make your CBitmap a member variable of your dialog class, then the bitmap will be existent while your dialog is up, or you could use the Detach method to "disconnect" the CBitmap and the HBITMAP but i don't know if the image control is possible to destroy the bitmap for you, pay attention or you could leak GDI resources.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Dear all,
How can I tell c++ to allocate memory from Physical RAM, not virtual memory (on WinXP).
Thanks in advance,
Regards
|
|
|
|
|
Can you more explain what do you need exatcly?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
|
Thanks a lot 4 ur excellent answer .
|
|
|
|
|
what is the meaning of '?'and ':' in this expression?
bool Addr
int m= Addr ? 1 : 5
thanks
|
|
|
|
|
means:
int m;
if (Addr)
{
m = 1;
}
else
{
m = 5;
}
check Addr (? -> check)
if its true use first expression (1)
else use second one (5)
|
|
|
|
|
X1 ? answer1 : answer2
If X1 is true the expression will return answer1, if it is not it will return answer2 and I think you are new so see C++ Reference[^].
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
This line of code first evaluates the condition 'Addr == true'.
Then, if the condition is true assigns 1 to m, otherwise asssigns 5 to it.
|
|
|
|
|
the ?: is a ternary operator(takes three operands), which is known as Conditional Operator. Its the simplified form of a simple if statement. Check the MSDN Link[^] for more info.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
It actually means you need a good C tutorial.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
How to calculate inverse of a matrix, i am using vc++ 6.0 ,
|
|
|
|
|
I'll guess you may have to write a program to do that, without regards to what version of Visual C++ you are using.
A little more clarity on your query, may be?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Well, homeworks are meant to be done by your brain, not by codeproject. Refer this code snippet[^] and try to write by your own. Hope it helps!
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|