|
Problem could be still suggested by Dave. I think one or more extra bits are accessed somewhere.
Try to keep track of character pointer used.
use strcpy() wherever needed, and with care
|
|
|
|
|
thanks for your info, here is another function that from same file, somehow, it's done deifferently.....
CFavNatDbf::CFavNatDbf(int exclusive)
: CB_DBF_NTX("DATA\\FAVNAT.DBF", exclusive)
{
if (validDBF())
{
char* ptrIdxName = m_csIdxFile.GetBuffer( L_tmpnam + 1 );
GetTempFileName( ".", "favnat", 0, ptrIdxName );
_strupr( ptrIdxName );
memmove( ptrIdxName, ptrIdxName + 2, strlen( ptrIdxName ) - 2 );
*strstr( ptrIdxName, ".TMP" ) = '\0';
index_on( ptrIdxName, "CUST_NUM + LOCATION" );
m_csIdxFile.ReleaseBuffer();
top();
BindFieldOrdinals();
}
}
CFavNatDbf::~CFavNatDbf()
{
}
void CFavNatDbf::BindFieldOrdinals()
{
}
|
|
|
|
|
I am programming a Socket enabled with SSL.I want to get certificate from a store provider.my certificate provider is a file.i downloaded the openssl and installed it.i used a command to generate certifcate request
openssl>req -newkey rsa:1024 -keyout server.key -nodes -days 365 -out server.crt<br />
with this command a certificate request (server.crt) is generated.i opened the server.crt and pasted it contents in Advance option (certificate service) to get the certificate.i got a certificate named as"certnew.cer".i opened the certificate ,there was an option "copy to file".i opted for PKCS#7 Certificates(.P7B) and named it FileStore.A file was generated named as Filestore.p7b
//this my code for certificate store
#define ENCODING_TYPE (PKCS_7_ASN_ENCODING | X509_ASN_ENCODING)<br />
<br />
HCERTSTORE m_hMyCertStore;
<br />
m_hMyCertStore = CertOpenStore(<br />
CERT_STORE_PROV_FILENAME_A,
ENCODING_TYPE,
NULL,
NULL,
_T("FileStore.p7b"));
i want to know whether my procedure is right to get the certificate from store.because i m getting error when i want
credentials for schannel
-- modified at 1:14 Thursday 29th September, 2005
|
|
|
|
|
I posted this in the general area with no luck.
Does anyone know of a way to hook into updates of the DC for the powerpoint slideshow? Can this be done from a plug-in? I did not find any info on how to implement a PPT plug-in.
|
|
|
|
|
hi i need to modify a standard mouse driver but i cant find the source anywhere
i have to write a driver that change the axis up down...is a simple task if i could find an source but i cant...
anyone know how to do a mouse driver?
i use visual c++ 6.0
|
|
|
|
|
The application I have in mind, has to sit in the background of Windows ( lets say as a Windows Service or a Taskbar app ) and scan for all the web pages that the user downloads and views using any Web Browser. Well this is only part of the application, actually the main thing, to scan for all the web pages the user visits on any browser and then process them for a certain task. So my question is, is it possible ? I mean isnt it the way Spyware and Adware runs ? But I think adware and spyware is browser dependaant and come as a plugin. Well I want it to be browser independent so thats why I suggested running the app in the background as a Windows Service or as a taskbar app.
I tried searching on the web for looking some similar projects but didnt come across any. Could u give me some leads as to how i should achieve this ?
I dont mind the programmin language I get to use. Im okay with .net or pure C++.
|
|
|
|
|
Hi
I want to start Yahoo Konfabulator, and in that Weather Widget, which is intalled on my PC, from my MFC application.
I tried using WinExec() and CreateProcess() functions. Using both I am able to start Konfabulator but not been able to start "The Weather Widget" which comes with it.
Any idea why it happens..? How to start it ?
Thanking you
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
Amarelia wrote:
I want to start Yahoo Konfabulator, and in that Weather Widget...
What are the steps to do this manually?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
maybe konfabulator offer a command line option ( or a preference file ) to start specific widgets when the app. is launched.
or maybe konfabulator contains an dev. API that let you do that.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Is it possible to get toner-level and life-meter of a desktop shared printer using win32 printer API? If not, any alternates for this.
Thanks.
|
|
|
|
|
Only if the printer's device driver provides such information. Otherwise, no. One of my printers writes a number to a .ini file indicating the ink level. The status utility simply reads that file to show the ink level as an image. Kind of cheesy but it works.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
How can I programmatically find/delete an entry in the Start Menu with the Win32 API?
Thanx!
|
|
|
|
|
Use SHGetFolderPath() to get the path to the Start Menu folder. Then use DeleteFile() .
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Thank you very much. There is also a SHGetSpecialFolderPath.
|
|
|
|
|
Hi best programmers,
Please help me with my problem.
I want to display captured streaming avi-data from webcam, but the main problem is to show the video on my dialogbox.
Actually it's very easy to get avi from webcam and I think it worked well so far, but to show in my dialogbox there is a problem.
The code I tried is as follows:
void CCamSampDlg::OnStart() //when I click on Start-button,
{ //the webcam will be activated (I see green
CRect rect; //LED turns on) and it should start showing
GetClientRect(&rect); //the videopicture on the dialogbox
// Here I try to display the imagestream
WebCam.Create(0,rect,&m_Disp,TRUE); //I think in this line something
WebCam.ConnectWithDriver(-1); //wrong.
WebCam.SetPreviewRate(15);
WebCam.StartPreview(TRUE);
}
void CCamSampDlg::OnCancel()
{
WebCam.Disconnect();
OnOK();
CDialog::OnCancel();
}
I've read the MSDN how to do that, but I guess I use the Creat-method wrong.
Please can somebody help me, you'll maken me so happy, really if I was a gay I would give a very big wet french kiss.
Thank you dear friends!!!!
If my application works, I forget all my problems.
|
|
|
|
|
Ok, that's nice but we cannot help you if don't explain us what is this WebCam member !
SimCom wrote:
really if I was a gay I would give a very big wet french kiss
Errr, no a 'thank you' is enough for me
|
|
|
|
|
Webcam is the variable of the type CAvicap class, like this:
CAvicap Webcam;
and the method Create is as follow:
BOOL CAviCap::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, BOOL fAutoSize)
{
ASSERT(!GetSafeHwnd());
if(GetSafeHwnd()) {
iLastError=CAP_CREATE_DUP;
return FALSE; //already connected, can't connect twice!
}
_autosize = fAutoSize;
HWND hWnd=capCreateCaptureWindow("AviCap_Basic",
dwStyle, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top,
pParentWnd->GetSafeHwnd(), AVICAP_WINDOW_ID);
if(!hWnd)
{
TRACE("CAviCap Window creation failed\n");
iLastError=CAP_WINCREATION_FAILED;
return FALSE;
}
//subclass standard window
SubclassWindow(hWnd);
::SetClassLong(hWnd, GCL_STYLE, ::GetClassLong(hWnd,GCL_STYLE)|CS_DBLCLKS);
#ifdef ON_CONNECT_CHECK_DRIVERLIST
_getDrvList();
#endif
return TRUE;
}
If my application works, I forget all my problems.
|
|
|
|
|
From where is this control coming from ?? And what is the error ? Is it a compile error (if yes, give the complete error message) or a runtime error (if yes, give as much information as possible).
You don't give us enough information to help you.
BTW, use the tags under the emoticons to format your code, it will be much more readable.
|
|
|
|
|
Dear Cedric,
First, I'm sorry I'm not so clear to you, but I will try to understand you what my situation is.
I want to make a simple dialogbox application just simply to show the video-image of the webcam, using CAvicap class wich encapsulates the win32API fucntions of VFW.dll or .cpp (you can see an article of that class, I'm sorry for the missing link)
So I included the CAvicap class in my DialogBox project.
To use the webcam, I have to do the following steps:
1) Call the Creat method of CAvicap
2) Callthe Connect method of CAvicap
3) Set preview rate (also a function of CAvicap)
4) Start preview (also a function of CAvicap)
And when to close it, I need to call the Disconnect method.
The part of showing the life video on my DialogBox is as follow:
<br />
void CCamSampDlg::OnStart()
{
CRect rect;
GetClientRect(&rect);
<br />
<br />
WebCam.Create(WS_CHILD|WS_VISIBLE,rect,&m_Disp,TRUE);
WebCam.ConnectWithDriver(-1);
WebCam.SetPreviewRate(100);
WebCam.StartPreview(TRUE);<br />
<br />
}<br />
<br />
void CCamSampDlg::OnCancel() <br />
{<br />
WebCam.Disconnect();<br />
OnOK();<br />
<br />
CDialog::OnCancel();<br />
}<br />
Here is the Create method declaration:
<br />
BOOL CAviCap::Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, BOOL fAutoSize)<br />
{<br />
ASSERT(!GetSafeHwnd());<br />
<br />
if(GetSafeHwnd()) {<br />
iLastError=CAP_CREATE_DUP;<br />
return FALSE;
}<br />
<br />
_autosize = fAutoSize;<br />
<br />
HWND hWnd=capCreateCaptureWindow("AviCap_Basic", <br />
dwStyle, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, <br />
pParentWnd->GetSafeHwnd(), AVICAP_WINDOW_ID);<br />
<br />
if(!hWnd)<br />
{<br />
TRACE("CAviCap Window creation failed\n");<br />
iLastError=CAP_WINCREATION_FAILED;<br />
return FALSE;<br />
}<br />
<br />
SubclassWindow(hWnd);<br />
::SetClassLong(hWnd, GCL_STYLE, ::GetClassLong(hWnd,GCL_STYLE)|CS_DBLCLKS);<br />
<br />
<br />
#ifdef ON_CONNECT_CHECK_DRIVERLIST<br />
_getDrvList();<br />
#endif<br />
<br />
return TRUE;<br />
} <br />
By the way the link where you can find the CAvicap class is here:
http://www.codeproject.com/audio/avicapwrp.asp
Well I hope I informed you well, if you want my project to look at it, I can send it to you. And thank you :->
If my application works, I forget all my problems.
|
|
|
|
|
Hi,
With yahoo messenger installed, if you would like to send
an instant message, you can goto Run and type like this
ymsgr:sendIM?somebody
The instant message window will popup. If the yahoo messenger is not running in tray, it will popup after it gets signed.
The same can be done with a hyperlink in a html page.
Yahoo Id: somebody
Now the point how is yahoo messenger achieving this. I would like to do the same for a simple dialog based application. I would like add my application name in the html page and the application should run when the hyperlink is clicked.
Please refer this.
http://www.codeproject.com/html/Yahoo.asp
Thank You
|
|
|
|
|
Normally, if you clik a text anchorded like that:
<A href="YourApp.exe">text</A>
the browser will ask you if the the app is to be saved or to be opened (i.e. run)
SkyWalker
|
|
|
|
|
I think it's not just running that application. It's probably a service that yahoo installs. But that's just a thought.
Also keep in mind that a good browser might block your attempt ( see Firefox), and dependeing on the user's security settings it might not even show a visible trace that the web page was trying to launch an application. It's quite a security flaw to allow web pages to run local applications on the client's machine. Instead, if your application is previously installed on that computer you should probably set-up some kind of communication, maybe on a set port and have your app listen for requests on that port from the web server your page is hosted on.
|
|
|
|
|
Hi mikanu,
This is not about security. Leave alone running an application from web page, if I would like to send an instance message from run, I would use like this
ymsgr:sendIM?mikanu
You can give it a try.
I would like to know about the logic behind the whole thing. Is there any API function so that my application can be registered with the registry or so.
It is similar to "callto:" , "mailto:". Even AOL messenger can also be called the similar way. I would like to run my application like "sampleapplication:". I dont think there can be a service running for each and every application.
Thank You
|
|
|
|
|
Hi vyjesh,
I think I understand now. What you need to do actually is to register your won URL protocol. Basically, when you type something like mailto: or file: windows looks up the URL protocol scheme and transfers the handle to the application registered for that protocol.
In windows XP it's pretty easy to create and register your own protocol. You would have to add a key in the registry under HKEY_CLASSES_ROOT\ and give it the name of the URL protocol you'd like registered. Let's say myproto. So you'd vahe something like HKEY_CLASSES_ROOT\myproto. Then on the default value for that key type: "URL: My_Name Protocol". Also, add a new value to this key and call it URL Protocol. Then add a new key to the myproto and call it shell. You don't need to make any cahnges to this key. Then under it, add a new key and call it open. Also, no changes here. Finally, under open add a new key and call it command. Now, change the default value for this key to: "C:\Windows\notepad.exe" %1. This will make your protocol launch notepad! Pretty cool huh?!
So your registry should be modified as foolows:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\myproto]
@="URL: Mikanu Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\myproto\shell]
[HKEY_CLASSES_ROOT\myproto\shell\open]
[HKEY_CLASSES_ROOT\myproto\shell\open\command]
@="\"C:\\Windows\\notepad.exe\" %1"
Then you can try this link: myproto:test.txt and it should lauch notepad and attempt to open a text file, called test.txt...
For further reading on URL schemes check this out, RFC 1738.
|
|
|
|
|
How can I determine that the clipboard content was dropped to the target window?
I implemented a code which moves data between two application using the COleDropSource stuff. Since the data are moved (NOT copied) between the applications I need to know when can I remove the moved data from the source application. So the question is how to determine that the target application pasted/accepted the data from the clipboard (or the drag&drop finished) and it is safe to remove the source data.
Can anybody help me with this?
Thanks,
Abyss
|
|
|
|
|