|
Why don't you just encrypt the file content and then decrypt it inside your VB application?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Because components wants from me a jpeg file path.
|
|
|
|
|
maxMESA wrote: Because components wants from me a jpeg file path.
Please don't shout.
BTW does it mean you cannot modify such component?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
yeah ok. i dont know how to modify. is it possible ? i think it's an activex object. in other words i dont have source code.
|
|
|
|
|
maxMESA wrote: n other words i dont have source code.
OK.
I guess you may (never done):
Encrypt the file.
Then, in your application, decrypt the content and write it to a locked file, pass the path of the locked file to the component and the unlock it and eventually delete it.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
What CPallini said, only when you create the temporary file, use the Win32 CreateFile function and pass DELETE_ON_CLOSE to it. (And obtain the temporary directory using GetTempPath() and name using GetTempFileName().)
|
|
|
|
|
Hi All,
My product runs as a service. During upgrade we remove the old service and install the new product instance. Now I want to preserve the old user credentials and apply to new service. How should I do this?
~ Vikram S
|
|
|
|
|
Hi,
well this is not quite the right place to post this question, please move this topic to windows related questions.
I want to give you a fast tip:
1) when installing a new service if you want to avoid problem use "instsrv.exe" (google about it)
2) then after creting the service edit the corresponding registry editor HLM\SYSTEM\CurrentControlSet\Services\yourservicename\Parameters
|
|
|
|
|
hi,
i want to create a sample app with one button and change its text according to UI language.hw can i do that?
|
|
|
|
|
Use a resourse dll of string table for each language you want to use in your application.The Id for a particular string in all dlls should be the same. Load the appropriate DLL (according to the local language) at run time, and read strings using LoadString http://msdn.microsoft.com/en-us/library/ms647486(VS.85).aspx[^]
Another way is to store strings of each language in separate XML files in such a way that the node name of a particular string is same in all XML files. Load the appropriate XML file and parse nodes using MSXML to read strings.
|
|
|
|
|
Use either a STRINGTABLE or MESSAGETABLE resource, as described here[^]. You can include these in your app if they are of reasonable size, or put into a separate dll as described in the previous answer. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
hi.
i have one itnerop dll which i am using in a MFC application. i use the function of dll in a thread created in main application. At some event i want to TerminateThread()
when i do that my dll function got hanged. when control comes to that function it looses its control. can anyone tell me what exactly happens in this senario and is TerminateThread() can be used in this manner
Plz help
Thanks
|
|
|
|
|
TerminateThread is evil and should never be used (you may use it just as extreme measure).
You should use an alternative way to terminate your thread.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
what are the other ways possible in MFC plz tell me.... i have used AfxBeginThread() to create the thread
|
|
|
|
|
You should read this assay [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
As its not a UI thread, better to use an CEvent in MFC to check when to exit the thread..
|
|
|
|
|
Cool_Dev wrote: As its not a UI thread, better to use an CEvent
But first make sure you've read the "Avoid CMutex, CEvent, CSemaphore and CCrticalSection" assay.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks to all of you for ur links and advices i will read all the eassays and then decide which will be approriate method to do my requirement.
Thakx
|
|
|
|
|
You are welcome.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
go for windows APIs for Events instead of using MFC.. no other better ways to request a worker thread to terminate itself..
|
|
|
|
|
Hi all,
I am trying to write MJPEG frames into AVI container.
When i try to play the .avi file in VLC player,It displays the following error message:
No suitable decoder module:
VLC does not support the audio or video format "����". Unfortunately there is no way for you to fix this.
How to solve this?
Pls help me.
|
|
|
|
|
check whether the decoder needed to decode the frames you wrote is installed on your system. use microsoft GraphEdit or similar kind of tools to check it..
|
|
|
|
|
hi
I have implemented as following:
UINT_PTR test = (UINT_PTR)processedJpegData; //This is the data to be written into AVI
LPVOID p = reinterpret_cast<LPVOID>(test);
if(!g_bCreated)
{
AVISTREAMINFO streamInfo;
memset(&streamInfo, 0, sizeof(streamInfo));
streamInfo.fccType = streamtypeVIDEO;
streamInfo.fccHandler = mmioFOURCC('M', 'J', 'P', 'G');
//streamInfo.fccHandler = mmioFOURCC('X', 'V', 'I', 'D');
streamInfo.dwScale = 1001;
streamInfo.dwRate = 30000;
streamInfo.dwSampleSize = 0;
streamInfo.dwSuggestedBufferSize = 0 ;
SetRect(&streamInfo.rcFrame, 0, 0,0,0);/* 720, 480,frameInfo.m_width, frameInfo.m_height*/
HRESULT hrCreate = AVIFileCreateStream(m_pAVIFile, &m_pVideoStream, &streamInfo);
if (hrCreate!=AVIERR_OK)
return ;
BITMAPINFOHEADER *bi = new BITMAPINFOHEADER();
bi->biSize = sizeof(BITMAPINFOHEADER);
bi->biWidth = 720;
bi->biHeight = 480;
bi->biPlanes = 1;
bi->biBitCount = 16;
bi->biCompression = mmioFOURCC('M', 'J', 'P', 'G'); // 0 = BI_RGB
bi->biSizeImage = size;
bi->biXPelsPerMeter= 0;
bi->biYPelsPerMeter= 0;
bi->biClrUsed = 0;
bi->biClrImportant = 0;
HRESULT hrSetformat = AVIStreamSetFormat(m_pVideoStream, 0,&bi, 40);
if(hrSetformat != 0)
return;
g_nIndex = AVIStreamLength(m_pVideoStream);
g_bCreated=true;
}
HRESULT hrStreamWrite = AVIStreamWrite(m_pVideoStream, g_nIndex++, 1, p,size, AVIIF_KEYFRAME, 0, 0);
if (hrStreamWrite!=AVIERR_OK)
return ;
This executes successfully and creates the AVI file also.But the problem is in playing that AVI file.
|
|
|
|
|
Are you sure you are writing a correct AVI file? Looks like VLC does not find the fourcc code for your codec (it should be something like MJPG). I am sure that you have a MJPEG codec in your system, but VLC cannot identify your AVI file as coded in MJPG. --
Si dos montan un caballo, uno debe ir detrás.
|
|
|
|
|
May be.I am using the fourcc code as mmioFOURCC('M', 'J', 'P', 'G').
How can we find whether we wrote a correct AVI file or not?
.AVI file size is 10 mb .
Also,AVIWriteStream function works fine.
So,I assumed that MJPEG frames were written into AVI container.
How to solve this?
|
|
|
|