|
If you can write to CurrentUser, you can also write to LocalMachine. Just use HKEY_LOCAL_MACHINE instead of HKEY_CURRENT_USER...
Accessing LocalMachine is exactly the same as CurrentUser.....
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
Assuming you have the according security rights to write to the registry,
maybe check the return values of the Reg...-functions.
jens
|
|
|
|
|
hello ppl
i have a TV tuner connected to my PC now what i want to do is that i want to inteface with the TV tuner card and find out how many channels are currently running basically what i have to do is grab an image from each channel and extract the logo out of each and every channel that the card is running so the part is about image processing but how do i start i mean i have to first interface with TV TUNER CARD. is there any SDK available or do i have to get a MANUFACTER independent SDK also the TV signals are transmitted via a coaxial cable that means i am not talking about interfacing with a device like a DV cam that is connected to the CARD but rather i am interested in the channels please help me out any help clue or anything would be appreciated
bye
|
|
|
|
|
DirectShow will do it nicely.
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"
|
|
|
|
|
|
http://www.msu.edu/~morri221/box.JPG[^]
Ok, thats my propertysheet dialog. I can get titles on the individual pages, but does anyone know how to get a title for the big blue space? Since there's not one major dialog, i can't figure out where to put it.
~keegster
*.*
cin >> knowledge;
|
|
|
|
|
Hi,
Assuming that you use CPropertySheet as a storage for your CPropertyPages, I think that a 'CPropertySheet'.SetTitle("My fancy Caption") will do.
Regards
G. Steudtel
|
|
|
|
|
Yep. that too
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"
|
|
|
|
|
You set that in the constructor of your property sheet class - as one of the parameters to the constructor of the CPropertySheet class (the first one, i think from memory).
Hope this helps,
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"
|
|
|
|
|
Edit: fixed! thanks guys.
|
|
|
|
|
I am using ADO to connect to MS_SQL database.
I need to retrieve the columns for a specific stored procedure in this database.
I tried the OpenSchema method with adSchemaProcedureColumns as QueryTpe but an error "Object or provider is not capable of performing requested operation" occurs.
These are the lines of codes that generates the error:
// Establish connection
ADODB::_ConnectionPtr MyConnection = NULL;
MyConnection .CreateInstance(__uuidof(ADODB::Connection));
MyConnection ->ConnectionString = _bstr_t (ConnectionString);
MyConnection ->Open(_bstr_t (L""),_bstr_t (L""), _bstr_t (L""), -1);
ADODB::_RecordsetPtr MySchema = NULL;
MySchema = MyConnection->OpenSchema(ADODB::adSchemaProcedureColumns);
How can i get rid of this error and retrieve the stored procedure.
Is there a solution to get rid of this error? or may be another method that can be used.
|
|
|
|
|
I don't know how/if you can do that with ADO. Since you're using sql server, there are a bunch of methods you can use to retrieve this information though.
You can use the system tables to retrieve information:-
select * from sysobjects o
join syscolumns c on c.id=o.id where o.name='p_YourProcName'
Alternatively, retrieve more wholesome information with the sp_help procedure.
sp_help 'p_YourProcName'
Personally, I prefer using the direct sql method with the system tables. For two reasons. 1) SQL Query Analyser colours the object names a pleasing shade of green, and 2) It creates potentially very lucrative future compatibility "problems".
Find more info about System Stored Procs in SQL2k at http://msdn.microsoft.com/library/en-us/tsqlref/ts_sp_00_519s.asp
Ta,
Jon
#include <beer.h>
|
|
|
|
|
I tried the above procedures but they retrieve the stored procedure parameters not the columns names.
|
|
|
|
|
i use stored procedures ,
you could try it like this, it works for me.
hope this helps
si
CString strSQL;
strSQL.Format("exec all_students '"+StartDate+"' , '"+EndDate+"'");
_variant_t vstrSQL;
vstrSQL.ChangeType(VT_BSTR);
vstrSQL = strSQL;
m_pDoc= GetDocument();
cpSet.CreateInstance(__uuidof(Recordset));
cpSet->Open(vstrSQL,m_pDoc->cpDb.GetInterfacePtr),adOpenDynamic,adLockOptimistic,adCmdText);
while(!cpSet->adoEOF)
{
cpSet->MoveNext();
}
cpSet->Close();
|
|
|
|
|
I guess this works fine but it retrieves the data from a stored procedure.
What i need is to retrieve the columns names and their type.
Any Ideas?!
|
|
|
|
|
add this into a stored procedure and the call it like i mentioned
in my answer before
DECLARE @TableName VarChar(50)
DECLARE @NumRows int
SELECT @NumRows = 3
SELECT @TableName = 'mytable'
SELECT COL_NAME(OBJECT_ID(@TableName),ORDINAL_POSITION) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = @TableName AND ORDINAL_POSITION <= @NumRows
hope this helps
si
|
|
|
|
|
I cannot change what is written inside the Stored Procedure, so i guess this way wont help me.
I found a solution but don't know if it is the best one. I exected the command of type Stored procedure and form the recordset returned i was wable to retrieve the fields information.
To overcome the retrieving of a long recordset i used "SET ROWCOUNT 1" before executing the command.
If anyone has better way plz tell..
Thanks
|
|
|
|
|
I don't use MS_SQL database but I have been using ADO a lot lately, and usually when you get an error such as yours, it means that you are sending the wrong request to the database (i.e. syntax is not correct, wrong parameters, etc). Hopefully, the other replies solve your problem, but I posted this message just in case they don't.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Hello,
Is CFile strong enough to allow a copy through a network connection (WAN) with some slow performance ?
Should I look to another solution ?
Thanks for your advices.
Pierre
|
|
|
|
|
Broker2003 wrote:
Is CFile strong enough to allow a copy through a network connection (WAN) with some slow performance ?
Yes, you shouldn't have any problems at all.
Hope this helps,
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,
well i used CFiles to do copying in a network, that was very slow, (300MBytes in three hours!!) and it worked ok. The only one being upset was the customer, because the net installation was expensive. So I think it should be ok to use CFiles in WAN too.
Regards
G. Steudtel
|
|
|
|
|
Hello,
I want to create a toolbar with a combobox in it and to detect when the combobox is updated !!!
toolbarFont.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
toolbarFont.LoadToolBar(IDR_TOOLBARFONT);
toolbarFont is a CToolbar object;
I have created some buttons in toolbar (ID_BUTTONFONTSTYLE for example) and then :
nIndex = toolbarFont.GetToolBarCtrl().CommandToIndex(ID_BUTTONFONTSTYLE);
toolbarFont.SetButtonInfo(nIndex, ID_BUTTONFONTSTYLE, TBBS_SEPARATOR, 150);
toolbarFont.GetToolBarCtrl().GetItemRect(nIndex, &rect);
rect.top = 1;
rect.right = 400;
rect.bottom = rect.top + 250;
comboFontStyle.Create(CBS_DROPDOWNLIST | CBS_SORT | WS_VISIBLE |
WS_TABSTOP | WS_VSCROLL, rect, &toolbarFont, ID_BUTTONFONTSTYLE);
everything works fine but how do I catch an event from the combobox ???
or any other ideea how to create it... ?
thanks !
|
|
|
|
|
You should be able to catch the combo box messages inside your frame class just like any other menu/toolbar message. You may not be able to use ClassWizard to do it, so you might have to edit the code manually.
Hope this helps,
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"
|
|
|
|
|
Hello,
I have a function that needs to write a fixed-size memory buffer to a binary file.
There are many windows functions which I could use ot write files, however I am only concerned with the fastest one.
Does anyone know which is the fastest function for writing a buffer to a file?
C++, W2K, XP
Thanks
Jeremy Pullicino
C++ Developer
Homepage
|
|
|
|
|
Jeremy Pullicino wrote:
Does anyone know which is the fastest function for writing a buffer to a file?
Fastest in the sense of actually writing the data, or returning control to your program the fastest?
For returning control to your program the fastest, WriteFileEx() using asynchronous (overlapped) I/O is about as quick as you can get. For actually writing the data, I'm not sure that there is much difference between the functions. You can use FlushFileBuffers() to force Windows to write the data to disk immediately rather than wait until later, if that's what you want.
Hope this helps a bit,
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"
|
|
|
|