|
Hi all,
Just new to the forum and was hoping that you may be able to help me out.
I am looking at running two or more BDA Filter graphs within the same process using two or more DTV cards. I have been able to operate two cards within the same process but have got a problem where the TIF is always updating from the NP causing a memory usage creep. I say this since the creep does not occur if the channels are the same on both cards.
Has anyone seen or know of a similar situation with the BDA structure?
Thanks,
Dan.
|
|
|
|
|
so i've done it again and taken a stupid little idea that i technically completed within an hour of work, and i'm turning it into a massive behemoth of unnecessary features. i wrote a tiny program to take all the images in a directory, do something to them (one at a time in order), and save them in a different directory. it works great. but after building a plugin architecture and threaded render engine, i've come to desire disk buffering. it probably wont improve performance but its what i want. what im thinking is, 1 thread for read, 1 thread for render, and 1 thread for writing. the read thread will have a counter semaphore that will signal the render thread when x number of images have been placed on the stack (doubly linked list) at which time the render thread will start pluggin away at the BOTTOM of the image stack (fifo). as soon as x frames are rendered, the write thread will also begin writing files to disk and plucking them off the stack. does this sound like a good method for implementing this? this was just kind of my first thought on the subject, and i thought someone might be able to give a better architecture and save me some headache and time. thanks!
|
|
|
|
|
I wanted to generate custom error msg at compile/link phase.
GCC provdes __attribute__ to generate compiletime error. e.g if you declare a function as
void get() __attribute((deprecated));
and if you access this function, it will generate warning message that this function is deprecated.
How do I generate custom msg insted of depprecated?????
How can we do in VC++?
|
|
|
|
|
|
Your subject and message ask for three different things: An error, a warning, and a custom message.
As mentioned, #pragma message can generate custom messages, but #pragma error generates custom errors.
A kludgy thing to do is to #define the method name into a #pragma error that halts compilation. I think I have seen that done before... Something like:
#define YourDepedFunc( P1, P2 ) #pragma error This is deprecated
Peace!
-=- James
Tip for inexperienced drivers: "Professional Driver on Closed Course" does not mean "your Dumb Ass on a Public Road"! Articles -- Products: Delete FXP Files & Check Favorites
|
|
|
|
|
I have to write a very small app in VC++ for my small shop. They want it written in VC++, otherwise I'd do this in Java or C#.
Anyway, at one point, they want to record which NT USER performed a transaction.
They specifically said:
"We want whatever Windows XP recognizes the current user as. So, whoever is logged into Windows, user their ID."
How do I do this? In really easy in Java and C#, but I don't know offhand how to do it in VC++.
Info:
Windows XP Pro
(Some MIGHT have Win2000, but 99% have XP)
I did this once in VB (might have hit a .dll to get the info) and it still works under XP. But the code is gone, so I don't know which DLL.
Thanks,
Chris
|
|
|
|
|
Might GetUserName be what you're after?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Is there any way to boot up a computer automatically at a specific time from a program,
ie run the program, call a function (???) and then switch off the computer, and then the computer would start up automatically at the specified time.
If not then is there some way of bringing the computer out of hibernation in a similar way???
Thanks
|
|
|
|
|
I'm not sure what you mean, but if you mean to restart a computer at specified time it is possible of course. Below you have a function for rebooting the computer. It works with all Windows versions. Call it with the in parameter EWX_REBOOT and the system will be rebooted:
BOOL WindowsExitOrReboot(UINT flags)<br />
{<br />
if (IsWindowsNT()) {
HANDLE hToken; <br />
TOKEN_PRIVILEGES tkp; <br />
<br />
SetLastError(ERROR_SUCCESS);<br />
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) <br />
return FALSE;<br />
<br />
LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &tkp.Privileges[0].Luid); <br />
tkp.PrivilegeCount = 1;
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; <br />
<br />
AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES)NULL, 0); <br />
if (GetLastError() != ERROR_SUCCESS) return FALSE;<br />
<br />
if (!ExitWindowsEx(flags | EWX_FORCE, 0)) return FALSE;<br />
return TRUE;<br />
}<br />
else {
if (!ExitWindowsEx(flags, 0)) return FALSE;<br />
return TRUE;<br />
}<br />
}
But if you mean to shut down the computer for a time and then let it start automatically I don't think it is possible. Not without some hardware.
|
|
|
|
|
I actually meant is there any way to turn the computer on automatically at a specific time, when it has been turned off manually. For example could I program the computer to boot up at 8 o'clock every morning?
If not, is there any way to bring the computer out of standby mode in the same way, ie bring the computer out of standby at 8 o'clock every morning.
Thanks
|
|
|
|
|
Hain i think you are seaching for wake on Lan feature type application.
i am able to boot computer through network at giving time.
bascially it functioning is like this->
You send a packet containg the subnet mask of you network to that particular computer which is in off state this feature only feasible for ATX cabinet computer & lan card with wake on lan feature
Happy programming
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
personally, I think you need a external device & program to control the power supply of shut down pc.
|
|
|
|
|
No its not possible. That is set in the bios, and you have no programmatical access to the bios.
|
|
|
|
|
I've been using dundas grid for a while, and my boss asked me about dundas toolkit ... I have a small knowledge of the toolkit, in an earlier versin, and it was ok.
what about roguewave's toolkit ? comparable ?
and are there any other toolkit available ?
Thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I have used Roguewaves Stingray Toolkit for many years now. It is pretty feature rich and I have had no need to look for alternatives. Unfortuneately I have not used Dundas and therefore can not make direct comparisons.
Perhaps Whitepapers from each would help you make a decision.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Hi there,
I need a random number generator with float output between 0 and 1 (similar to Math.random() in javascript).
Is there already a function or where to get one?
Thx for your help,
Alex
Don't try it, just do it!
|
|
|
|
|
A true random number generator does not eixst, but you can use rand() for pseudo-random numbers.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
hmmm, rand is not very good. a bad resolution and values between 0 and 0x3FFF.
Don't try it, just do it!
|
|
|
|
|
Actually it returns values between 0 and 0x7fff. In any case, if you simply want floating-point values between 0 and 1, couldn't you just divide by RAND_MAX ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
could be a solution, even if it's not the best. but thanks anyway.
Don't try it, just do it!
|
|
|
|
|
well, you can of course generate numbers between 1000 and 2000. Subract 1000 from the random number and divide the result by 1000 into a float.
say rand() outputs 1746:
1746-1000 = 746
746 / 1000 = 0,746
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
Thats what I was going to suggest.
How do I print my voice mail?
|
|
|
|
|
Thirded!
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Random numbers have been the most popular subject for grad students to study in computer science since before comptuer science was a program at universities! There is good reason for this, and it goes well byond what anyone would write in a simple post.
Start reading, until you understand what question to ask you should not ask the question. Once you know what questions to ask you are well on your way to finding a solution.
Donald Knuth's "Art of Comptuer Programing" is a good start (but a little expensive, and not a simple read). There are plenty of web resources.
|
|
|
|