|
Yes thank you! That was it!
So stupid: The worst thing a coder can do, is to define an array with size 10 and then try to write something in array[10]... Unfortunatly the socket was defined directly after the array, and got overwritten... börks...
Thank you!
DKT
|
|
|
|
|
How can I build a driver in Visual C++, what are project settings? Please give me a simple way to achieve it.
|
|
|
|
|
|
The easiest way is to use the build tool (see DDK) to compile it.
Don't try it, just do it!
|
|
|
|
|
I find all the ways to create avi file are from sequence bitmap files, can avi created from sequence jpeg files?
if it can, how can I do the program step by step?
I am a freshman in video...
thanks
|
|
|
|
|
Search msdn.microsoft.com for AVIFile Functions and Macros
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
|
I can't figure why the following matrix multiplication isn't working. Can someone please help me?
<br />
<br />
#include <math><br />
#include "stdafx.h"<br />
#include <iostream><br />
using namespace std;<br />
<br />
double theta, phi, t, p;
double lambda1 = 0.5;<br />
double lambda2 = 2;<br />
double a11,a12,a21,a22,d11,d13,d31,d33;<br />
const double pi = 3.142857;<br />
const int rows = 3;<br />
const int cols = 3;<br />
<br />
void mult(double *fr_array2);<br />
<br />
<br />
double dip_array [3][3] = {0}; <br />
<br />
double azim_array [3][3] = {0}; <br />
<br />
double lambda_array [3][3] = {0}; <br />
<br />
double r_array [3] = {0};<br />
<br />
double fr_array [3][3] = {0}; <br />
<br />
double fr_array2 [3] = {0}; <br />
<br />
<br />
<br />
double a(double p)<br />
{<br />
d11 = cos((p*pi)/180);<br />
return d11;<br />
}<br />
<br />
double b(double p)<br />
{<br />
d13 = -1*sin((p*pi)/180);<br />
return d13;<br />
}<br />
<br />
double c(double p)<br />
{<br />
d31 = sin((p*pi)/180);<br />
return d31;<br />
}<br />
<br />
double d(double p)<br />
{<br />
d33 = cos((p*pi)/180);<br />
return d33;<br />
}<br />
<br />
<br />
double e(double t)<br />
{<br />
a11 = sin((t*pi)/180);<br />
return a11;<br />
}<br />
<br />
double f(double t)<br />
{<br />
a12 = cos((t*pi)/180);<br />
return a12;<br />
}<br />
<br />
double g(double t)<br />
{<br />
a21 = -1*cos((t*pi)/180);<br />
return a21;<br />
}<br />
<br />
double h(double t)<br />
{<br />
a22 = sin((t*pi)/180);<br />
return a22;<br />
}<br />
<br />
<br />
void printarray (double arg[][3]) <br />
{<br />
for (int i=0; i<rows; i++)
{<br />
for (int j=0; j<cols; j++)
cout << arg[i][j] << " ";<br />
cout << "\n";<br />
}<br />
}<br />
<br />
void printarray2(double arg[]) <br />
{<br />
for (int i=0; i<rows; i++)
{<br />
cout << arg[i] << " ";<br />
cout << "\n";<br />
}<br />
}<br />
<br />
<br />
<br />
<br />
<br />
int main(int argc, char* argv[])<br />
{<br />
<br />
cout<<"ANISOTROPY MODELLING.\n";<br />
cout<<"\nPlease enter a real number between 0 and 360 for the azimuth angle, theta, then press the 'Enter' key.\n\n";<br />
cin>>t;<br />
<br />
cout<<"\nPlease enter a real number between 0 and 360 for the dip angle, phi, then press the 'Enter' key.\n\n";<br />
cin>>p;<br />
<br />
a(p);<br />
b(p);<br />
c(p);<br />
d(p);<br />
e(t);<br />
f(t);<br />
g(t);<br />
h(t);<br />
<br />
double dip_array [3][3] = {{d11,0,d13},{0,1,0},{d31,0,d33}}; <br />
<br />
double azim_array [3][3] = {{a11,a12,0},{a21,a22,0},{0,0,1}}; <br />
<br />
double lambda_array [3][3] = {{lambda1,0,0},{0,1,0},{0,0,lambda2}}; <br />
<br />
double r_array [3] = {4,8,3.94};<br />
<br />
<br />
<br />
cout<<"\nThe dip array is:\n";<br />
printarray(dip_array);<br />
<br />
cout<<"\nThe azimuth array is:\n";<br />
printarray(azim_array);<br />
<br />
cout<<"\nThe anisotropy array is:\n";<br />
printarray(lambda_array);<br />
<br />
cout<<"\nThe original range array is:\n";<br />
printarray2(r_array);<br />
<br />
<br />
mult(fr_array2);<br />
cout<<"\nThe final range array is:\n";<br />
printarray2(fr_array2);<br />
<br />
<br />
<br />
return 0;<br />
}<br />
<br />
void mult(double *fr_array2)<br />
{<br />
for(int j=0;j<cols;j++)
{<br />
for(int i=0;i<rows;i++)
{<br />
fr_array2 [j] += r_array[i]*azim_array[i][j];<br />
}<br />
}<br />
}
For whatever value of theta or phi I enter, the final range array consistently reads '0' which shouldn't be. What am I missing???
|
|
|
|
|
Anybody is having LSB Insertion algorithm? Any code in VC++ for the algorithm?
|
|
|
|
|
That kind of question is not really funny!!!!
Search Google!
Don't try it, just do it!
|
|
|
|
|
Hi...
I am having a problem on coverting Bitmap image to IplImage format.Is there
is any OpenCV function to convert it?Or will u please help me with any other way of Conversion..
with a lots and Lots of Hope
Regards,
Hari
|
|
|
|
|
we need a code to take a poto by using a web cam
|
|
|
|
|
|
hi ,
I am trying to change BackColor of MS CommandButton from Thread. But it is giving me Exception.
code of Thread is :
UINT mainThread(LPVOID param)
{
while(!killThread)
{
if(yes)
{
try
{
yes = FALSE;
dlg->m_jbutn.SetBackColor(0x0000ff00);
//dlg is a ptr to dialog (same as 'this')
}
catch(...)
{
MessageBox(NULL,"Exception","Error",NULL);
}
}
Sleep(500);
}
return 0;
}
/**********************/
m_jbutn.SetBackColor(0x0000ff00);
this line works fine outof Thread. So why it is not working in Thread.
|
|
|
|
|
You can only update a GUI control from the same thread that created it. You'll have to send a message to the thread to tell it to update the button.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
Does anyone know if it is possible to set up DMA to transfer data between two memory locations within my C++ application, so that I would use CPU for other calculations while transferring data with no CPU involvement.
Cheers,
Vitaly
|
|
|
|
|
You can't!
DMA devices are not available to user-mode applications. They are also NEVER used to copy memory simply from one location to another!
They are used to copy memory from physical addresses of buses (e.g. PCI bus) to virtual memory sections allocated by the OS and vice-versa.
Don't try it, just do it!
|
|
|
|
|
Hi.. I posted this difficulty before also .. My application is playing only PCM encoded wave files.. I need to play a file which is compressed and in the CCITT A-Law audio format .. How to uncompress it and play..? OR how to convert a file from A-Law to PCM..
Any suggestions???..
Thank you
pallavi
|
|
|
|
|
Build a DirectShow filter graph and play it.
Read the DirectShow SDK for further information.
Don't try it, just do it!
|
|
|
|
|
I am doing some operation on files. The operation vary for files which are currently in use and which are not. So i wish to know that how to find whether a file is in use or not. I try to open file exclusively but it returns true even if the file is in use by some program.
Thanks.
|
|
|
|
|
Does anyone know a way to determine the launching process of another process that has no parent? ie. was started with system function or cmd /c start
Any help would be greatly appreciated!
|
|
|
|
|
you have to hook CreateProcess for that
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
can you be more specific. i am trying to write a program that will retrace respawning spyware back to launching process. the respawned processes have no parent, so how to determine which process launched it.
|
|
|
|
|
|
Thanks Alok! looks like some stuff in there I may be able to use. I am vb/vfp programmer in over his head a little with c++ code, but I am feeling my way through it. Sometimes just need a point in right direction! thanks again
dman
|
|
|
|