|
I have a problem. For 2 years i've been developing an application which someone else did before me (job thing), and someone else did before him...
Well. Everything is OK, but when I want to Browse Info (to see base classes etc) i get an error without any explanation. It only says:
Creating browse info file...
Error executing bscmake.exe.
***.exe - 1 error(s)
ANy ideas?
Love is the law, love under will.
|
|
|
|
|
please?
Love is the law, love under will.
|
|
|
|
|
Hello, everyone. I met a problem days ago. I used the webbrowser to play the powerpoint file. but when I set focus to the Webbrowser window which is playing powerpoint, I cannot get any key strokes even if in the thread message queue.
where's wrong? can anybody help me? Thanks very much!
|
|
|
|
|
Consider the following code snippet..f1,f2 and f3 are functions.
int f1(int,int);int f2();int f3();
here f3 is a library function,so i don't have access to it's internal code.
int a = f1(f2(),f3());
now,i want to stop execution of f2(and f1) if f3 returns a non zero value..how can i do this on the run i.e thru code ?
thanks in advance
|
|
|
|
|
Can't you simply do this:
int Return = f3();<br />
<br />
int a = 0;<br />
if (Return == 0)<br />
a = f1(f2(), Return);
|
|
|
|
|
yea it's possible but i was asked to do it without inserting any other statement than f1(f2(),f3())..i.e check should be after call to f1 is made but not in code of f3 since it is a library function.
|
|
|
|
|
int a = f1(f2(), f3() != 0 ? throw 0);
Does that work?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
have f3 throw an exception if it's about to return anything other than a zero.
|
|
|
|
|
hi every body
i have problem with this code :
////////////////////////////////
///code in delphi
function doGetStat(aCallBackStatsParser:dfCallBackStatsParser; var strError:string):boolean;
var startTime : DWORD;
begin
result := true;
if SysHandle=0 then exit;
startTime := GetTickCount;
repeat
if abs(GetTickCount - startTime) > 1000 then break;
// Have driver fill Stats buffer with information
if not DeviceIoControl(SysHandle, IOCTL_FILEMON_GETSTATS,
nil, 0, @Stats, sizeof(Stats),
StatsLen, nil) then begin
strError := 'Couldn''t access device driver. errorCode ='
+IntToStr(GetLastError);
result := false;
exit;
end;
if StatsLen=0 then break;
if assigned(aCallBackStatsParser) then aCallBackStatsParser;
until false;
end;
//////////////////////////////////////
// Code in VC
BOOL CDriverApp::doGetStatvoid(*aCallBackStatsParser)(void) , CString *strError)
{
DWORD startTime ;
result = TRUE;
if (SysHandle==0 ) return FALSE ;
startTime= GetTickCount() ;
while(TRUE)
{
if( abs(GetTickCount() - startTime) > 1000 ) break ;
// Have driver fill Stats buffer with information
if (! DeviceIoControl(SysHandle, IOCTL_FILEMON_GETSTATS,
NULL, 0, &Stats, sizeof(Stats),
&StatsLen, NULL) )
{
strError->Format("Couldnt access device driver.\n errorCode = %d" ,GetLastError()) ;
result = FALSE ;
return FALSE ;
}
if(GetLastError()== ERROR_INSUFFICIENT_BUFFER)
strError->Format("small buffer") ;
if ( StatsLen == 0 ) { return result ;}
if (aCallBackStatsParser!= NULL) (*aCallBackStatsParser)() ;
}
return TRUE ;
}
///////////////////////////////////////////
it is working in delphi but not in VC
why ??
|
|
|
|
|
Hello all.
Now I am doing UML application.
But I cannot decide that HOW "add text to a rectangle"
HELP ME
|
|
|
|
|
hiho
i'm using a visual c++ .net setup project to install my software
the problem is that the installation can only be done my an administrator because it writes in the c:\program files\... directory
so i want that if the user installs my prog, the radio button for 'install for actual user' is set to 'install for all users'
because if the user installs my app with admin rights, it only installs for current user (if the user doesn't check the radio button to all users)
and the current user is the admin
is there a setting in the setup project, where i can change the pre-definition for the radio button?
i've not found one
and is there a way to automatically deinstall the software if it is already installed, before newly installation
because my setup aborts if the software is already installed
thx
|
|
|
|
|
Hello,
After reading "Modern C++ design" by "Andrei Alexandrescu", I wanted to use the Loiki library. I can't get the library to compile under VC++ 6.0, but it works like a charm on Visual Studio 2005.. I was wondering, does VS6.0 support the template stuff used in the loki library?
Thanks.
I also got the blogging virus..[^]
|
|
|
|
|
how can i connect in to a database without specifying the DSN name in the connection string ?, i heard some string with the combination of SERVER ; DATABASE and DRIVER can do that ! i tried but i couldnt.. any idea?
thanks in advance
Situation : my program uses SQL server as database( local / remote ). user can add multiple companies( each company creates as seperate database), and i connects them via DSN , the problem is the DSN is creating in local machine. but the company details keeps in remote machine, any user connects to the remote machine can view the companies but he couldnot connect to that bcz the DSN resides in local machine from where the company was creted.
if there is any machanism to represent the DSN detailes in remote machine ( Table entries), i can connect into companies by using those info without depending the local DSN
Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.
|
|
|
|
|
Try this search.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello Friends,
Please obeserve the cpp program given below
#include <iostream.h>
int main(void)
{
register int i = 10;
cout <<"the address of i" << &i << endl;
cout <<"the value of i is " << i << endl;
return 0;
}
The output of the program is given below
the address of is 0x0012FF7C
the value of i is 10
The same program is written in C and the program is given below
#include <stdio.h>
int main(void)
{
register int i = 3 ;
printf ("the address of i %u", &i);
printf ("the value of i %d" , i);
return 0;
}
The program show an error which is given below
compiling...
register_c.c
D:\c++\registe_test\register_c.c(7) : error C2103: '&' on register variable
Error executing cl.exe.
register_c.obj - 1 error(s), 0 warning(s)
My question is what is the difference in the use of register variable is c and cpp program.I am able to get the address of register variable in cpp using the "&i". The same technique is not allowed in c program .
Can anyone tell what is the reason this is happening.
Hoping for a reply.
Best Regards,
Phijo Philip.
|
|
|
|
|
From MSDN entry on "register Keyword"
[quote]
ANSI C does not allow for taking the address of a register object; this restriction does not apply to C++. However, if the address-of operator (&) is used on an object, the compiler must put the object in a location for which an address can be represented. In practice, this means in memory instead of in a register.
[/quote]
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Another point you should remember is that the compiler may choose to ignore your "register" keyword, i.e. it treats
register int i = 3 ;
as a request to make i a register variable. The compiler may decide to make it a memory variable instead. And it will not tell you if it decides to ignore your "register" request.
|
|
|
|
|
Hello,
I have a difficulty regarding my project. I want to set or reset the data pins on parallel port 'lpt1'.Is there is any function to do this?
Also I want to monitor the printer port like, what is the status of it,i.e. which data pins are set and which are reset and then I want to store these values in a database to take further action.
Rohit Deshpande-
atotalgeek@gmail.com
|
|
|
|
|
The parallel port is accessed through I/O calls. The lpt1 address is usually 0x378 (data), 0x379 (status), 0x37a (control). You can use these assembly functions to write and read the port:
inline char inportb(short port)
{
char rtn;
__asm {
mov dx, port
in al,dx
mov rtn, al
}
return rtn;
}
inline void outportb(short port, char data)
{
__asm {
mov al, data
mov dx, port
out dx, al
}
}
But keep in mind that "in" and "out" are priviledged instructions and will cause an exception on NT/2000/XP. To use them you'll need to grant the process special priviledges using an installed service or similar. If you can't find info on that I may be able to dig up my old code.
Do some google searches on the above and it should answer most of your questions. I also recommend the book "Parallel Port Complete" by Jan Axelson. I used it extensively years ago and it is indeed complete
Nicholas
|
|
|
|
|
Thanks Nicholas,
Well I will definately do some google searches for that special priviledges.But do you have some code written in C++ so that i can easily implement it in VC++?
And also help regarding monitoring the lpt1.
Rohit Deshpande-
atotalgeek@gmail.com
|
|
|
|
|
Hi again-
Regarding monitoring you'll need to use the 'status' IO address. Some ports also are bi-directional and you can read the data on the D0-D7 pins using the data IO address. Read up on all these things to learn more. It's all out there...
Regarding giving your program IO access, here's a solution that should work for you. My solution was implemented the same way:
http://pages.zoom.co.uk/andyc/ntdriver.htm
Good luck,
Nicholas
|
|
|
|
|
|
u will also find the function outportb() and inportb(); a useful one for thiz(just mention the port name "0x378" and the databyte to be sent/to be recieved.....
as said before u can use thiz for the control and status port as well.....
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
Hi, there. It really depends on what kind of interaction you need. If you are using the standard printer protocols like Nibble mode or EPP mode etc, you should use the WIN32 API to read/write from the port. Or if u want to access the raw port registers directly, one good free source is the one provided by beyondlogic. Just google for it , its called INPOUT32.DLL.It has a driver that allows direct access to the parallel port. I hope this will help you.
there's no such thing as a stupid programmer...
|
|
|
|
|
It's a stupid question, I know, but anyway..
Suppose, I have some MDI application with a modeless property sheet. In one of the property pages classes (CInput: public CPropertyPage) I have a public function AddEditBox() (which creates and displays Edit Boxes). I want to call that function on some event, which I handlе in my View class.. what shoul I do?
|
|
|
|