|
I would like to implement the article that used the DDK listed here: http://www.codeproject.com/system/mydvdregion.asp
Except in C#. The WDK is for C and C++ and is a 1-2 gig download I would much rather not do. Any other libraries for sending CDBs to a drive? Thx.
Any help?
|
|
|
|
|
Why do you need the DDK? If you look through the source code you'll see that nothing in the DDK is referenced, he's simply borrowed definitions from the DDK so that people don't need to download it.
To use this in C# all you need to do is translate the C++ to C# et voila. It uses nothing special you'd just need to use P/Invoke to send the commands using DeviceIOCtrl.
I have no idea what I just said. But my intentions were sincere.
|
|
|
|
|
Cheers to you. I'm now on the right track. Basically I load in the kernall32.dll and I can call the DeviceIoControl() method from there. P/Invoke is a way to make interop possible by loading .dlls from the past. Very nice. Thanks very much Ed.Poore
Many Thanks.
Try
|
|
|
|
|
Hi to all!
I would like to ask you which coding convention do you use?
Regards,
|
|
|
|
|
That's a very broad question, how do you mean ?
I use braces like this
try
{
}
not
try{
}
I use _ and camel case for private variables, and I capitalise the first letter of public and protected methods/variables.
I make sure all variables are private
I don't use Hungarian notation
What else were you hoping for ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
oops. i refreshed the page before responding to this..![Frown | :(](https://www.codeproject.com/script/Forums/Images/smiley_frown.gif)
|
|
|
|
|
Hi every one,
I have server/client programming.
I'm using Remoting idea. I have server that should send the device(web cam) to the client so he can use it to capture video. But I have failed to send the device???
Can any one tell me how to send the device using the remoting? is it creating new Filter or what??
If there is any other simple & better idea other than remoting please tell me.
Thank u any way
Ali
|
|
|
|
|
Why would you want to do that? Wouldn't it be better to set-up a streaming server or something like that, take a look at Windows Media Encoder[^]. Just set-up your server and connect to it from the client program.
|
|
|
|
|
Um can you explain more clearly for those who missed the earlier question?
|
|
|
|
|
I'm writing a program that needs to take a list of hostnames/usernames/passwords and change each machine's registry settings over the network. I've tried using OpenRemoteBaseKey, but that only allows for a hostname input. I have limited network programming experience and was wondering if there was an easy way I could connect to each of my nodes over the network to change the registries. I can elaborate if needed. Thanks in advance!
-Ryan
|
|
|
|
|
|
Sorry if it sounds like a stupid question. I did a bunch of searching before I asked here, but I'm kind of lost as to what's a good way to do this. Most links just explained how to access remote registries that you already have permission to access. If you could just point me in the right direction, I'd really appreciate it.
|
|
|
|
|
How do you expect to access registries you don't have permission to? You planning to write a virus or something?
I have no idea what I just said. But my intentions were sincere.
|
|
|
|
|
I have an administrator username/password for each of the machines. I'm trying to remotely update registry values on multiple machines at once.
|
|
|
|
|
What about the RegistryKey.OpenRemoteBaseKey[^] method? Doesn't that do what you want, obviously you'll need to be logged in so presumably if you're a domain administrator then you can just run the code. If you have individual usernames/passwords for each computer then my guess is that you'll have to access the machine through explorer first to "log" onto it. Once that is done then you should be able to update it.
I have no idea what I just said. But my intentions were sincere.
|
|
|
|
|
OpenRemoteBaseKey only takes the hostname as an input. I need to use a username/password, also. I did some more searching and saw this - http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/37d17466c08886cb/935e84260c3a280f?lnk=st&q=c%23+remote+registry+username+password&rnum=9&hl=en#935e84260c3a280f
I'm assuming this is what I'm looking for hopefully.
|
|
|
|
|
That would make sense
I have no idea what I just said. But my intentions were sincere.
|
|
|
|
|
For example I'm buiding Find/Search function in new form and I want to be able to search for sting in parent form from this child form (child form have text box where user enter word he is looking for)?
Parent form have multi Rich Text Box(es) (in tabs)... menus etc
So this is probably simple I tried few things but none works... I guess I'm just doing something wrong.
Thanks ![Smile | :)](https://www.codeproject.com/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
If you have a Form (say mainForm) containing text, and you want an interactive search facility, you could create a dialog using a new Form (say findDialog)
which has mainForm as parent (so it hides when mainForm hides), and which is
shown as modeless dialog (i.e. it can give up focus to other windows in same app).
Now mainForm can have button event handlers attached to the buttons of findDialog,
read an editTextBox on findDialog, and do whatever is required within mainForm.
So the trick is in mainForm attaching event handlers to another form's buttons,
but then it did create that other form (findDialog) so it has a reference to it.
Hence it boils down to one of the following:
- make the Controls on findDialog public (is not what Visual Studio Designer does
by default, but there is a "Modifiers" field on the properties panel)
- add public properties to get access to the non-public controls you need
- add one or more public methods to findDialog to attach an event handler to the
non-public controls you need.
The choice is yours.
Personaly I often create dialogs programmatically (rather than through Designer)
and make all controls public.
-- modified at 14:05 Saturday 6th January, 2007
Luc Pattyn
|
|
|
|
|
OK I like idea, I did change properties to buttons and textbox in child to public, so I can now access them within main form, but how do I add event handler to button from child form in main form?
Sorry for trivial question but I'm new in this.
Also does anyone have idea why I can't access richtextbox in main form from child form it's labeled as public also?
I can for example access text box in child form from main form, but it's of no use, I need to attach that event so it does that on button click not before or after.
|
|
|
|
|
No no, the simplest way is the other way around, it is the main form that does
everything about the text, including the searching, the findDialog's purpose is
to specify and trigger the search, not to perform it.
And the architecture would be something like this (incomplete!):
public class mainForm : Form {
FindDialog findDialog;
public mainForm() {
}
public void btnOpenFind_Click(object sender, EventArgs e) {
findDialog=new FindDialog();
findDialog.btnFind.Click+=new EventHandler(btnFind_Click);
findDialog.btnClose.Click+=new EventHandler(btnClose_Click);
findDialog.ShowDialog();
}
private void btnFind_Click(object sender, EventArgs e) {
}
private void btnClose_Click(object sender, EventArgs e) {
findDialog.Close();
}
}
public class FindDialog : Form {
public Button btnFind;
public Button btnClose;
public TextBox tbSearch;
}
Hope this helps you way forward.
Luc Pattyn
|
|
|
|
|
It works thanks, can someone explain what we did here (I understand basic), so we can add event to current object to instance in another object?
|
|
|
|
|
Event Listeners are another option. Personally I usually use Dialogs, which has already been said.
On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. - Charles Babbage
|
|
|
|
|
Im probably missing something simple but here is my problem.
the app have 1 main form (Form1) with a dataset, dataAdapter and
databinding to some table.
Then i create another form (Form2) that contains a DataGridView
in order to bind the columns in the designer, I must have a new dataset object
another dataAdapter and another binding source.
How to prevent that , the ideia is that i want to call the Form2 in Form1
with something like new Form2(BindingSource), but still be able to use the designer
generated code.
How can i do that besides messing with the autogenerated code ???
|
|
|
|