|
Nikz2 wrote: this->Fieldlist=HeadList; // an error appears. WHY HE CAN'T COPY A POINTER?!?!?!?!?!?
I just put your code into Visual C++ Express and it runs fine. There must be something else that you are not showing that causes the problem.
|
|
|
|
|
Well. I am sure that there has to be a thing, but i really don't even understand what could it be.. Any clue?
|
|
|
|
|
I found it!!! Cool. It was really simple.
TLevel *lvl = new TLevel(4,1);
CString str("C:\\FieldList.txt");
theApp.lvl->LoadList(str);
theApp.CreateLvl(lvl, this, 30, 30, theApp.FieldSize);
i make theApp.lvl inside of CreateLvl and at rate of LoadList it hadn't iniciated.
Thanks to all. It helped me a lot to understand that i am not crazy. Because i was really desperate =) thanks....
|
|
|
|
|
Is there some reason you're not using a standard container class - writing your own list makes absolutely no sense unless you're writing it to learn about things or because it's an assignment.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Well.. You see. It's just i tryed to use standart class and it resulted the same. I was thinking i use it wrong and for delete any doubt i wrote my own. It took me 10 minutes. And the problem and seeking for right code and examples took me hours. So sometimes it's more easy to use your own classes =)
|
|
|
|
|
Hi All Vc++ Programmers,
I have a strange issue with me.I have migrated one Application from vs-2003 to vs-2008 on Vista machine.When i enter a correct password it is getting logged in,but when i enter a wrong password the application gets crashed...I dont know how it is happening,,,,?
Why genarally exe crashes and if anybody having some idea please help me... I think it is a dll problem due to migration..?
modified on Friday, October 2, 2009 8:59 AM
|
|
|
|
|
When you log into Vista, your application crashes? If so, please explain the connection.
"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
|
|
|
|
|
Was the application build with vs2003 ever ran on Vista ? or did you upgrade both OS and compiler at the same time ?
Is it possible your application is trying to access registry values without proper permissions ?
...
This signature was proudly tested on animals.
|
|
|
|
|
Dear Experts,
i could not able to build a following visual c++ code.can any one help me?
It shows can not open activeds.h
#define _UNICODE
#pragma comment( lib, "Activeds.lib" )
#pragma comment( lib, "Adsiid.lib" )
#include "stdafx.h"
#include <atlbase.h>
#include <activeds.h>
#include <cstringt.h>
#include <atlstr.h>
#include <comdef.h>
#include <Iads.h>
#include <Adshlp.h>
int _tmain(int argc, _TCHAR* argv[])
{
HRESULT hr;
IADsContainer *pCont = NULL;
CoInitialize(NULL);
hr = ADsGetObject(L"WinNT://xxx.com/dc1.yyy.xxx.com", IID_IADsContainer, (void**) &pCont );
if ( !SUCCEEDED(hr) ) { return hr;}
_variant_t var;
IEnumVARIANTPtr pEnum;
ADsBuildEnumerator (pCont,&pEnum);
int cnt=0;
ULONG ulFetched = 0L;
_variant_t vChild;
while((SUCCEEDED(ADsEnumerateNext(pEnum, 1, &vChild, &ulFetched)) && ulFetched==1))
{
IADsUser* pADs;
hr = V_DISPATCH(&vChild)->QueryInterface(IID_IADsUser, (void**)&pADs);
if(hr!=S_OK)
break;
BSTR bstrName;
pADs->get_Name(&bstrName);
CString csName=bstrName;
SysFreeString(bstrName);
printf("%s\n",csName);
pADs->Release();
pADs = NULL;
}
// Cleanup.
if ( pCont )
{
pCont->Release();
}
CoUninitialize();
}
return 0;
}
|
|
|
|
|
raja 4 wrote: It shows can not open activeds.h
So does it exist? It should be part of the Platform SDK.
"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
|
|
|
|
|
you are using the following header files
#include "stdafx.h"
#include <atlbase.h>
#include <activeds.h>
#include <cstringt.h>
#include <atlstr.h>
#include <comdef.h>
#include <Iads.h>
#include <Adshlp.h>
Is it a small project?
does your application contains the activeds.h?
If your project does not contain any file,then only you will get this problem..First you look for this header file whether it is there in your appliation or not..?
|
|
|
|
|
Hi, I need to capture data (TEXT only) which is printed on a specified printer (no matter what is the type of printer).
I'm thinking about printer driver which will redirect print jobs to a real printer but this seems to be too complex.
May be nother solution exists (does it?). Could anyone tell me how can this be done in C++ or where can I read about this?
Thanks in advance
|
|
|
|
|
ibnhatab wrote: I need to capture data (TEXT only) which is printed on a specified printer (no matter what is the type of printer).
I don't think this is possible, either with C++ or any other language. Modern print functions do more than just write strings of text line by line to the device. They have to manage page positioning, headers and footers, etc.
Perhaps if you explain more of what you are trying to achieve we could offer some suggestions.
|
|
|
|
|
First of all I need to capture data which is going to be printed (no matter which format).
Getting TEXT only data is next step of this task.
Main task is to catch data which goes from a POS system to printer(usually TEXT only printer).
Thanks in advance.
|
|
|
|
|
This sounds quite a complex project. The only way I know of capturing all data, is by creating a printer driver program which can be used in place of a physical printer. This program will need to interpret all the print commands in order to layout the actual text on some form of virtual page. Finally the text information will need to be extracted and reformatted according to your requirements.
The only tools I'm aware of that may help are the Ghostscript tools found here[^].
|
|
|
|
|
|
What's your real problem that you're wanting to solve by intercepting text sent to the printer (which, I'll tell you now, is likely to be nigh on impossible, and incredibly fragile if you diod get something working)?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Stuart Dootson wrote: What's your real problem that you're wanting to solve by intercepting text sent to the printer (which, I'll tell you now, is likely to be nigh on impossible, and incredibly fragile if you diod get something working)?
POS systems - Text capture is quite common. Usually done via hardware by tapping serial printer's RX line and reading the ASCII bytes. In this case he wants to capture it at a software level not a hardware level. Since he's using the Generic Text Only driver, there is no graphics involved in the printing process - everything is ASCII. Text capture is done for security reasons in order to show / prove the proper change has been returned or that the operator actually puts the cash in the till and not in his pocket (text capture is usually superimposed over live video of the cashier.)
|
|
|
|
|
Hi All,
while doing CreateInstance("Msxml2.XMLHTTP.4.0"); it thows exception.
In my local system it is working fine but when i deployed it on server it thows me exception, any suggestion would be helpful for me.....
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
Ash_VCPP wrote: ...but when i deployed it on server it thows me exception, any suggestion would be helpful for me.....
Does it exist?
"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 David,
Thanks for the reply...
but i didnt get you... about what you are asking? is it msxml dlls in system 32 or what...please make the point clear.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
If the ProgID does not exist on the machine (i.e., MSXML has not been installed), CreateInstance() is obviously going to fail, hence why I asked if it existed.
"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
|
|
|
|
|
CreateInstance returns an HRESULT. What is the value?
Best Wishes,
-David Delaune
|
|
|
|
|
Hi,
I am looking for a portible Email Client for Embedded OEM system.
Can someone help me?
Regards,
Kobi
|
|
|
|
|
Yeah sure, okay.
What's it's name?
You look over there, and I'll look over here. If I see anything I'll call out coo-ee.
|
|
|
|