|
Hi,
We are developing KIOSK applications for banks. In our KIOSKS, we are using Panasonic KX-7100 printers. If you have ever seen a KIOSK application, no window or dialog box except the ones that are belong to related application is allowed to appear. So we must restrict printer related dialog boxes and error windows inside our applications. For example when paper finished, printer shows a “Printer Status Display” window .
How can we understand out of paper error inside our application not to show this window, but our own dialog box? There is a class called Win32_printer, but i coulnt find any sample code. Is there anybody that can help me?
|
|
|
|
|
Hi All,
I am working on a project which deals with diffgram files.I am facing a problem to store the values of elements from the diffgram file to a database table.I can create the database table but how to store the values from difgram to those tables lies the challenge ahead of me.
Can anybody send me link or the code snippet for this.
Thanks a Million.
Gaurav
|
|
|
|
|
I need to convert a char *test; to a int.
how can I do that?
|
|
|
|
|
Converting char to int is implicit. Converting a string to an int is simple - use atoi.
BTW, this is not the C++ forum.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Here is convertion from char to int
char t = '7';
int i;
i = atoi( (CString)t );
//now i is 7;
m0n0
|
|
|
|
|
|
Why on earth do you cast to a CString ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hail Programmers
I am trying to compile a VC++Net2003 Project that includes the following struct:
typedef struct xlref<br />
{<br />
WORD rwFirst;<br />
WORD rwLast;<br />
BYTE colFirst;<br />
BYTE colLast;<br />
} XLREF, FAR *LPXLREF;
The compiler chokes giving the following error message:
"c:\call.h(28) : error C2146 : syntax error : missing ';' before identifier 'rwFirst'"
MSDN suggests that this error occurs "as a result of compiler conformance work that was done for Visual Studio.Net 2003: explicit specialisations no longer find template parameters from primary template."
If anyone speaks MSDN, I'd be grateful if could you tell me how I fix the struct?
Regards
Jeremy
|
|
|
|
|
Try to add this header to your code:
#include <windows.h>
|
|
|
|
|
Many thanks RainbowWyrm - Yes, I had left out <windows.h> - Thanks again
|
|
|
|
|
I am developing directx filters based application and while building the project i am facing this problem. I think this problem is a general one.
CaptureFilter error LNK2020: unresolved token (0A000014) new
CaptureFilter error LNK2020: unresolved token (0A000029) delete
Can you tell me why i am getting this error?
thankx
|
|
|
|
|
|
Hi Ursus,
i went to the site but it does not have much information. I really dont know where these functions are defined.
it seems there is a problem when one develops managed c++ applications.
ve
|
|
|
|
|
As you no doubt know, new and delete are C++ language keywords. And, if you are writing a filter in DirectShow, which is an unmanaged library, you shouldn't be getting that error for any reason that I can imagine. It doesn't make sense. Are you using the /clr switch?
I really can't imagine why that is happening, except that your error is SO HUMONGEOUSLY STUPID, that the compiler doesn't know which possible error message of thousands to send.
I hope that you have a sense of humor. I do stuff like that all the time (I'll forget something REALLY obvious and basic), and, I get the most ridiculous error messages. You know something is seriously wrong, but, the specifics are a mystery,...and, then, it dawns on you.
You'll figure it out, I'm sure.
|
|
|
|
|
well i need to figure it out. yes i agree that the error is very stupid. i looked up the code i am just stuck up with this error. I am getting any idea why i am gettting this error.
ve
|
|
|
|
|
Just in case you didn't get this on MSFN,...
Hi eligeti vinod,
It's me, ursus zeta, from CodeProject. I googled your Link error code and discovered that you've posted all over the Internet. And I can't seem to get into the CodeProject for some reason,...
Anyway, after rereading your C++ command Line and Linker options, I noticed that you used the "/clr" switch, making your DirectShow filter DLL a managed .NET DLL.
I don't know if you are aware of it, but, the DirectShow object libriaries are 'unmanaged' COM libraries; .NET and COM types are NOT compatible. I assumed you were aware of this when I responded to your original post.
When using COM components in .NET applications, the correct technique is to use System.Runtime.Interop which manages the data exchange between the two entities. The COM Interop creates wrappers for all COM types so that they are usable in a .NET environment.
In your case, I think that you want to create an application that is unmanaged (by the Common Language Runtime); in other words, a Win32 application.
Review the Samples that accompany the C++ DirectShow SDK, and you will see that they do not use the /clr switch.
This is from the DirectShow FAQ at the MSDN site:
Will DirectShow ever be accessible through managed code?
There are no current plans to implement a "Managed DirectShow" platform. You can use COM interop to create DirectShow client applications in managed code, but creating filters that depend on the Common Language Runtime (CLR) is not recommended for performance reasons.
|
|
|
|
|
one question. is it not possible to call managed .NET code from directX filters which r unmanaged. Well actually my filter is whut i copied from the pushource filter of the sample provided by the directx sdk 2003. when i created the project i checked Console Application(this i suppose is .net) and not Win32 Console application and then changed to dll option.
i commented all lines of using statements which uses the managed code and still it gives me the same error.
Can you tell me how i can disable /clr option?
|
|
|
|
|
Happy Friday! Gurus,
I am trying to use the logics from Intel OpenCV DLLs, which were originally compiled by MSVC++ 6. From C# or ASP.NET Apps, when I was trying to add reference to these DLLs (i.e. cv096.dll or cxcore096.dll), I got this error:
“A reference to ‘D:\Programs\OpenCV\bin\cv096.dll’ could not be added. This is not a valid assembly or COM component. Only assemblies with extension ‘dll’ and COM components can be referenced. Please make sure it is a valid assembly or COM component.”
Note: The source code of Intel OpenCV DLLs is open source. I can open this source code project in either MSVC++ 6 or VS.NET 2003.
Question: How can I use these DLLs in .NET environment, preferably in ASP.NET and C# projects?
Thanks with a million
Khang
|
|
|
|
|
|
As mentioned in the previous post, you can't add a reference to the DLL since it's neither a .NET assembly, nor exposing COM interfaces -- when you add a reference to a COM DLL VS.NET just generates a .NET P/Invoke wrapper around it so you can use it without declaring things yourself.
Again, you can either go down the route of writing DllImport & P/Invoke stubs (although if you're using reasonably complicated data structures this can be time consuming unless someone else has already converted them).
Alternatively, you can use the (rather cool in my opinion) It Just Works functionality within MC++. Effectively you write a .NET wrapper around the functionality exposed by the Intel libraries by linking etc. as you would with MSVC++6. Now, I'm a little rusty on this, I've not done any MC++/interop code for a good while now, but it should be relatively straightforward. Effectively you compile your assembly with the /CLR compiler switch, this in turn generates managed code, including the P/Invoke code that would otherwise be up to you to write in C#. Of course, you'll need to make sure you link with the libraries, and include the headers.
If you get stuck with that I'm sure people will be able to give you more detailed instructions.
--
Paul
MS Messenger: paul -at- oobaloo-co-uk
|
|
|
|
|
Paul, thank you so much for your very descriptive and helpful insights. I really appreciate your spent time for thinking and writing it up. Wish you a beautiful Spring season.
Again, Thanks
Khang
|
|
|
|
|
Hi!
I'm facing a problem with my mixed-mode plugin-dll and hope that somebody has an idea how to solve it.
The DLL is exporting several functions to a host application. Inside these functions, I'm using some managed classes to perform the functionality. Some of these managed classes are embedded in my own assemblies and the DLL has to find them at run-time.
It works when my assemblies are located in the sample path the host application resides in, but I need to put them in the path where my plugin-dll is located (I'm not allowed to install dlls into the host application's path).
But then, the CLR throws FileNotFoundExceptions when trying to load one of my classes. Even changing the current directory to my plugin's location didn't work.
I guess I could strongname my assemblies and put them into the GAC, but I'd rather not (now), because I'm not sure how this could influence my other components which are using the same assemblies.
Is there any other way to make the CLR find the assemblies in a given path?
TIA,
mav
|
|
|
|
|
Since no-one is answering and I've found a working way I thought I'd share the information in case anyone actually uses the search function
Adding a ResolveAssembly event handler for the current AppDomain works.
That way I get notified whenever an assembly is about to be loaded and I can determine the path it gets loaded from.
mav
|
|
|
|
|
I'm trying to output a list to a printer using borland C++. I'm a beginner and can't figure how to do it. Another thing is that its a network printer. Please help me output this line:
"Game 1 vs Game 2"
"Jim vs Dorine"
Please please help!
|
|
|
|
|
Borland does not support managed C++.
There are, however, a number of articles on this site about printing that should point you in the right direction. The network printer thing is irrelevant, the driversd hide that detail from your code.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|