|
Thanks for the information.
In one of your previous replies to the similar problem you have suggested to include afxAmbientActCtx = FALSE; in the Initinstance function.
I have been trying to use this flag in Initinstance of our application. But I am getting this error
"error C2065: 'afxAmbientActCtx' : undeclared identifier"
Can you suggest what has to be added .
Thanks..
|
|
|
|
|
Hi,
I believe the afxAmbientActCtx is only available in CWinApp/CWinAppEx applications. It is actually equal to the the AfxGetModuleState()->m_bSetAmbientActCtx. This is probably not what you need.
V K 2 wrote: Can you suggest what has to be added .
Well you did not answer my questions. I asked them for a reason. So now I have to make a guess as to how to fix your ActiveX DLL.
Anyway if your ActiveX DLL exposes MFC functions then I would recommend protecting them with a call to the AFX_MANAGE_STATE[^] macro at the top of your exported function. The error you are recieving is related to Activation Contexts[^] so you will also need to double check that your manifest file is correct.
Best Wishes,
-David Delaune
|
|
|
|
|
hi every body.......
in my application i want to convert any format to pdf
i.e word,excel,xml,html,ppt and so on....
in my application using C(or)C++ code....
thanks in advance......
if find any mistakes in my typing sorry......
thanks in advance....
|
|
|
|
|
soo preety wrote: in my application i want to convert any format to pdf
You will need to understand how to read the various file formats using the available interface libraries as appropriate. Then you need to render the output in PDF format which will require one of the PDF libraries or printer drivers.
|
|
|
|
|
This looks lke an exact duplicate of a question from "eswar pothula", below. It would appear that you are abusing the forum - please desist.
|
|
|
|
|
hi everybody,
iam using <b>DeviceIoControl()</b> to get the physical drive number. but
the problem is that the DeviceIoControl is giving error 87.means that parameter is incoorect.
please help me anybody knows this solution.
int GetDriveNumber(CString strDrive)
{
TCHAR lpWindowsDir[_MAX_PATH+1];
VOLUME_DISK_EXTENTS pdg;
CString strDevice;
HANDLE hDevice =NULL;
DWORD dw;
DWORD dwBytesReturned;
GetWindowsDirectory(lpWindowsDir,_MAX_PATH+1);
strDevice.Format(_T("\\\\.\\%s:"),strDrive);
hDevice = CreateFile(strDevice,
GENERIC_READ,
FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);
if(hDevice != INVALID_HANDLE_VALUE)
{
BOOL bIsSucces = DeviceIoControl(hDevice,IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS,NULL,0,
&pdg,sizeof(pdg),&dwBytesReturned,NULL);
dw= GetLastError();
CloseHandle(hDevice);
return pdg.Extents->DiskNumber;
}
return FALSE;
}
Regards,
Srinivas
|
|
|
|
|
Your code worked fine for me. How are you calling GetDriveNumber() ? Are you calling GetLastError() regardless of what DeviceIoControl() returns.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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 Srinivas,
What type of storage device are you using this control code on? You need to call GetLastError and check to see if the buffer you passed was too small. This control code can return an array greater than your buffer size.
Best Wishes,
-David Delaune
|
|
|
|
|
i got it, where is the problem.
i declared as #pragma pack(push, 1) in stdafx.h file.
it is working perfect,if i removed #pragma pack(push, 1) in a stdafx.h file.
but i need #pragma pack(push, 1) some where in my code,
how can i disable this pragma pack1 through code.
tell me if anybody knows this soultion
thanks
Regards,
Srinivas
|
|
|
|
|
Hi Srinivas,
You should only add this #pragma pack[^] around the structs,classes that require packing. After the struct/class declaration you add:
#pragma pack(pop)
This will allow the other data types to have previous alignment.
Best Wishes,
-David Delaune
|
|
|
|
|
Create a C/C++ console application which connects to a MySQL database and shows all tables and their Primary Keys.please provide the answer.......
kir_MFC
|
|
|
|
|
We'll assume that the language barrier is responsible for making you look as if you're a lazy young idiot who's incapable of doing his own work. I'm sure that's not really the case.
|
|
|
|
|
|
kir_MFC wrote: please provide the answer.......
kir_MFC wrote: Create a C/C++ console application which connects to a MySQL database and shows all tables and their Primary Keys.
That's not a question.
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 connect to mysql through c++ using console application?Please do reply as soon as possible in my email address:sheshank.me@gmail.com
|
|
|
|
|
Hi all
I have to run my MFC applications in other PC's .I have developed the application using VS2005 .The EXE works fine in my computers.But i need to run on many computers.Can any one suggest me a idea???
Thanks in advance!!!!
Regards
Gany
|
|
|
|
|
In other PC , u have also include exe with lib or dll file ..
|
|
|
|
|
On the project property's 'Configuration' tab, specify 'use MFC in a static library'. This will remove dependencies on the MFC dlls; you won't have to redistribute those with your .exe. Any third-party dlls you might use will still have to be distributed with the app. Place them in the same directory as the .exe when distributing.
If you want to get a little more professional, you can put together an installation package (.msi) that can create shortcuts to the user's Programs directory, creates any necessary registry entries, etc. VS05 supports this - it's pretty straightforward.
|
|
|
|
|
Hi
Thnks for your reply..
can you help me in providing steps for running the application as a installtion package .msi...
Your reply is highly appreciated.
Thanks
Gany!!!
|
|
|
|
|
Hi
i tried running the application using static library.
My Application is a Database oriented and hence i m getting the following error.
"oracle client and networking components were not found.These components are supplied by oracle corpartion and are part of the oracle version 7.3.3 or later client software insatllation
provider is unable to function until these components are installed."
Kindly provide me a solution
|
|
|
|
|
hi every body.......
in my application i want to convert any format to pdf
i.e word,excel,xml,html,ppt and so on....
in my application using C(or)C++ code....
thanks in advance......
if find any mistakes in my typing sorry......
thanks in advance....
modified on Tuesday, November 10, 2009 6:47 AM
|
|
|
|
|
Hello
The best is to use a PDF Printer Driver.
it is a virtual printer that you install on your computer and you call when you want to print your document.
Somes are free .. and somes not.
(PDF995, PDFCreator, Amyuni, ...).
Regards
Franck
|
|
|
|
|
hello
i drew some polygons, i want to fill each with a bitmap instead of rgb colors...
how can i do that?can you give me an example code?
thk you very much
|
|
|
|
|
please guide for me convert image tiff to image bmp by VC++6.0. not MFC.
wish help of everyone .
thanks very much.
nothing
|
|
|
|
|
You may use, for instance, GDI+ Image class [^].
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]
|
|
|
|