Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

BigBenDk

@BigBenDk
About
Posts
14
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Reading and writing USB HID FeatureReports async.
    B BigBenDk

    Hi Jason Thank you for your input, appreciated! Unfortunately, I did not write the firmware for the device. It uses feature reports as a 'bidirectional' report instead of input/output reports. I have already implemented a polling solution, with best guess of how long to wait for, and what the polling frequency should be. It works, but burns a lot of clock cycles in an already loaded system. Thanks again and good luck with the fireworks - be careful :)

    C# help

  • Reading and writing USB HID FeatureReports async.
    B BigBenDk

    Hi, I am trying to communicate with a HID device, using feature reports. When using normal input and output reports, I use the FileStream to read and write reports. This works great, even with async communication. My problem is that I am using feature reports instead. This means using the HidD_SetFeature and HidD_GetFeature from the Windows hid.dll file. This also works, but the HidD_GetFeature cannot be used async. When called it does not block until there is a report, so I end up having to poll when I expect there to be data. So I am looking for a way to do feature reports async, or have the HidD_GetFeature method to block until there actually is a report. Any insight is appreciated!

    C# help

  • Pipping data to and from process
    B BigBenDk

    Yeah, I look at the OutputDataReceived event, and for a moment considered doing reverse text encoding on the string - but that was an absolute last resort :D The threading is handled internally, and has no contact to the GUI. You can se a sample of it at: http://bendtsen.net/sample.txt[^]

    C# csharp data-structures help question

  • Pipping data to and from process
    B BigBenDk

    Hi Thank you for your quick response. I did some more work on it, and it looks like it was a threading issue. If I read the out stream in a diferent thread, it does not block. Im not sure why, but it works.

    C# csharp data-structures help question

  • Pipping data to and from process
    B BigBenDk

    What I need to do is something like this. DataCruncher.exe < input.bin > output.bin It is an application that is called in the command prompt. The input.bin file is piped in, and the result is outputed to output.bin. Works great. Now instead of starting the app from a command prompt, I need to call it from a C# app.

    ProcessStartInfo info = new ProcessStartInfo(location);
    info.Arguments = BuildArgs();
    info.RedirectStandardInput = true;
    info.RedirectStandardOutput = true;
    info.RedirectStandardError = true;
    info.UseShellExecute = false;

    _process = Process.Start(info);
    _toApp = _process.StandardInput.BaseStream;
    _fromApp = _process.StandardOutput.BaseStream;

    The input is in binary format, and so is the output, so I used the basestream instead of the StreamReader. My problem is that it is blocking when im reading from the standard output.

    while (true)
    {
    int read = _fromApp.Read(readbuffer, 0, readbuffer.Length); // <-- blocks

    if (read == 0)
    break;

    //Do something with the data.
    }

    It looks like it is blocking the stream until it has all the bytes to fill the readbuffer array. Is there something I should be aware of when read/writting to a process?

    C# csharp data-structures help question

  • Advice on manipulating audio files
    B BigBenDk

    Hi, I am currently looking at building a product that manipulates various audio formats. It has a few requirements Converting: FLAC -> WAV WAV -> FLAC WAV -> MP3 (various bitrate) WAV -> Vorbis (various bitrate) I am looking for high quality library's that can do the conversions. The MP3 conversion should support setting ID3 tags, including cover art. I have been looking at LAME, but it is not all to "C# friendly", and it does not support FLAC conversion. Any libraries I should be looking at, or other advices for achieving this? It does not have to be free, but is of cause preferable.

    The Lounge csharp business question

  • Debugging UDP on local machine
    B BigBenDk

    Thank you - I looked at the list. The problem with many of them is that it is not possible/hard to filter out other traffic. It is very confusing to debug in 500 packages, when 98% of them are irrelevant. I found "Ultra Network Sniffer"; it is perfect for the job. You can monitor any running application. And only packages transmitted to/from are shown. Unfortunately it crashes on Windows Vista :/ - had to move the project to an XP box.

    IT & Infrastructure tools question

  • Debugging UDP on local machine
    B BigBenDk

    Hi I am currently writing an application that communicates with a local program using UDP - but I need tools for debugging. Anyone knows a good "UDP sniffer", that can read local packages? Preferable with a filtering option to root out all existing communication. Thanks in advance!

    IT & Infrastructure tools question

  • Creating a document window in Visual Studio
    B BigBenDk

    Hi I'm trying to create a custom document in a Visual Studio Add-in. What i want to do is load a usercontrol, and show it as a normal document. Just like if you were editing a C# file. The content of the document, is not loaded from the project/solution, but using a webservice. The most obvious approach was creating a class, that inherits the IDocument interface, and implement the signatures. There after add it to the document collection. This is where it breaks - I can't add an IDocument object, only a guid. Any thoughts on how to accomplish this? All help is welcome! :omg:

    Visual Studio csharp visual-studio help tutorial question

  • UserControl as document in Visual Studio
    B BigBenDk

    Hi I am creating an addin for visual studio. It uses WCF services, and I would like to edit the objects as documents. This is somewhat similar to what the client of the Team Foundation Server does. I have created the toolboxes I need - partialy based on this two Code Project articles: http://www.codeproject.com/csharp/cpbrowser.asp and http://www.codeproject.com/WCF/WCF\_FileTransfer\_Progress.asp For the documents I have made a ToolWindow in the same way, by setting the Floating property to false. It is close to what I want. But it has drawbacks. I can't set the document as "changed", and therefore i can't use the save button, and the undo/redo, print buttons are also disabled. What I really want is to load a UserControl as a document - this seems like simple task, but I am lost here. I looked at the VSIP SDK - it has samples that are close, but they seem bound to specific fileextensions/files. When I load from a service, I don't have any elements in the loaded solution/projects. I can't believe it is that complicated.

    Visual Studio csharp visual-studio wcf com sysadmin

  • Reading configurations from a Visual Studio Add-in
    B BigBenDk

    I have created an add-in to Visual Studio 2005, and I would like to use a WCF service. This requires a configurationfile with the configured endpoints. Normally I would create an app.config, and let visual studio build it to [appname].config in the output directory and it would work. But when i try to access the services from the add-in, i get a configuration error that the endpoints are not configured. How do i make it open the configuration for the add-in, and not for Visual Studio? With kind regards Soren Bendtsen

    Visual Studio csharp question visual-studio wcf help

  • Reading configurations from a Visual Studio Add-in [modified]
    B BigBenDk

    I have created an add-in to Visual Studio 2005, and I would like to use a WCF service. This requires a configurationfile with the configured endpoints. Normally I would create an app.config, and let visual studio build it to [appname].config in the output directory and it would work. But when I try to access the services from the add-in, i get a configuration error that the endpoints are not configured. How do i make it open the configuration for the add-in, and not for Visual Studio? With kind regards Soren Bendtsen

    .NET (Core and Framework) csharp question visual-studio wcf help

  • Advice on WCF configurations
    B BigBenDk

    Hi Pete Thank you for the speedy reply! Is it really that simple? - I looked at message security configurations, that seemed far more complex. E.g http://msdn2.microsoft.com/en-us/library/ms789011.aspx Do you know how to specify the credentials on the client side, if entered manually?

    C# security csharp wcf sysadmin cryptography

  • Advice on WCF configurations
    B BigBenDk

    Hi I have spent the last few days surfing the net on WCF and on how to configure it, but I can't seem to find the correct solution. I have made an application, that is used on internal lan (Client/Server). I would like to use the existing windows logon, and integrate with the local domain controller. Additional I would like to have the option to enter an other windows logon, than the one the user is currently logged on with. Security is not that big a concern, because all traffic is internal and the information is not very sensitive - but of cause it should not be ignored. I would like to avoid having to setup SSL and manage certificates - It makes it harder to deploy, and if I have to purchase a certificate for every customer, it raises the price of the product. How would you recommend setting up WCF in this scenario?

    C# security csharp wcf sysadmin cryptography
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups