CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: zvenny

Page 1 of 18 1 2 3 4

Search: Search took 1.04 seconds.

  1. Thread: SHA256.Create

    by zvenny
    Replies
    2
    Views
    1,610

    SHA256.Create

    Experimenting with the SHA256 class and now struggling with the Create method overload that takes the hashname as a parameter
    SHA256 alg1 = SHA256.Create(); // returns a default SHA256Managed...
  2. Replies
    5
    Views
    1,599

    Re: Continuation tasks

    No, it's different ! And meanwhile I found out what's causing the different behavior.

    My first way of starting the task, note the '() =>'
    Task t = Task.Factory.StartNew(() =>...
  3. Replies
    6
    Views
    2,774

    Re: struct initialization

    I had already figured out the :this() solution ;)

    Thanks for your explanation on the CS0188 , the specific struct behavior is clear to me now !
  4. Replies
    5
    Views
    1,599

    Re: Continuation tasks

    No mistake ! Please note the x as a parameter to the delegate in the 2nd way of starting the task.
  5. Replies
    5
    Views
    1,599

    Continuation tasks

    Given following
    static void Main(string[] args)
    {
    try
    {
    CancellationTokenSource cts = new CancellationTokenSource();
    Task t = Task.Factory.StartNew(() =>...
  6. Replies
    6
    Views
    2,774

    Re: struct initialization

    It's not a question wether to use struct or class.

    I'd just like to know why struct gives me a compile error and class doesn't ?
  7. Replies
    6
    Views
    2,774

    struct initialization

    public struct FullName
    {
    public string FirstName;
    public string LastName;

    public FullName(string First)
    {
    this.FirstName = First;
    this.LastName = Demo();
    }
  8. Replies
    0
    Views
    760

    Assert stack trace ?

    Ok, assertions are only performed when DEBUG constant is defined (debug config typically), but if I define this constant
    in my release config and hit CTRL+F5, stack trace in the assertion dialog is...
  9. Thread: DateTime weird

    by zvenny
    Replies
    5
    Views
    1,288

    DateTime weird

    Trying to estimate when a test will end
    DateTime EndTime = new DateTime(DateTime.Now.Ticks + NTests * 20000000);This gives me an end time lower than DateTime.Now !?!? Thought it was caused by long...
  10. Replies
    0
    Views
    2,305

    VS2008 Setup Project Dependencies bug ?

    My solution contains an app project, dll project and 2 setup projects. The app is dependent on the dll and both come in 2 build configurations, let's say Config1 and Config2. When I switch between...
  11. Replies
    0
    Views
    5,099

    xaml resource image

    In my xaml I have an image on a button with following code
    <Image Source="/MyAssembly;Component/Resources/MyImage.png" Width="32" />I'm now wondering if I can do this without the fully qualified...
  12. Replies
    0
    Views
    695

    Select specific resx file

    A form in my app contains a button with an image , so the frmMyform.resx file contains btnMyButton.image ... that's clear ! Now, I want to add another button to the form with the same image. Ok, I...
  13. Replies
    1
    Views
    996

    Test for tunnel adapters

    In my application I list all available network adapters...
    ..
    foreach (NetworkInterface ni in NetworkInterface.GetAllNetworkInterfaces())
    {
    //add it to UI combobox
    }
    ..As my app is now...
  14. Replies
    1
    Views
    4,037

    Re: taskkill *32 process

    Apparently it has nothing to do with the *32 ! Tried it with taskkill from the command prompt
    and there noticed Access Denied. Ran the command prompt as administrator and then it works.

    No idea...
  15. Replies
    1
    Views
    4,037

    taskkill *32 process

    In Win 7 64bit (and other 64bit OSes also probably) , the process I'm trying to kill is listed as "AppToKill.exe *32".
    Following code works in 32bit XP but in Win7 64bit it doesn't kill it ......
  16. Thread: PathIsDirectory

    by zvenny
    Replies
    4
    Views
    2,625

    Re: PathIsDirectory

    My workspace has an app and dll project. I've included shlwapi.h in the dll stdafx.h and linked shlwapi.lib in the dll project settings.

    The call to PathIsDirectory is at application level. Does...
  17. Thread: PathIsDirectory

    by zvenny
    Replies
    4
    Views
    2,625

    PathIsDirectory

    I'm trying to use PathIsDirectory in a unicode build but always get
    error LNK2001: unresolved external symbol __imp__PathIsDirectoryW@4I've included shlwapi.h and link to shlwapi.lib .

    Can anyone...
  18. Replies
    1
    Views
    643

    VS6 environment settings

    Is there an easy way to transfer my VS6 settings (Tools > Options...) to a new pc ?
    Or should I manually re-enter everything (include file dirs, lib file dirs, ...) ?
  19. Replies
    3
    Views
    2,470

    Re: QueueUserWorkItem

    Until yesterday, I did not know about delegate inference in C# :blush:
    The comment in the MSDN article indeed made me think this was a VB feature.

    Thx all :thumb:
  20. Replies
    3
    Views
    2,470

    QueueUserWorkItem

    It appears I can also call QueueUserWorkItem without a WaitCallBack constructor in the parameter list ...
    static void Main(string[] args)
    {
    ThreadPool.QueueUserWorkItem(ThreadMethod);
    ...
  21. Replies
    2
    Views
    698

    Re: Regular expressions

    Ok, so basicaly the Groups property returns the first match and all parenthesized subexpressions of this first match.

    My approach was incorrect ! I should have used the Regex.Matches property...
  22. Replies
    2
    Views
    698

    Regular expressions

    The code below...
    string sInput = @"from 2010 to 2011";
    Regex reg1 = new Regex(@"\d+");
    Regex reg2 = new Regex(@"(\d+)");
    Match m = reg1.Match(sInput);

    Console.WriteLine(sInput);...
  23. Thread: INT64 in IDL

    by zvenny
    Replies
    18
    Views
    6,654

    Re: INT64 in IDL

    That would have been too easy ! I'm using VS6 and llVal is not defined in my oaidl.h :cry:

    That's more or less what I meant with;)
  24. Thread: INT64 in IDL

    by zvenny
    Replies
    18
    Views
    6,654

    Re: INT64 in IDL

    Been looking into that, but couldn't quite figure out how to use VARIANTs for 64bit :blush:

    Will investigate this suggestion further !
  25. Replies
    6
    Views
    9,558

    Re: Reading CPU Temp

    Just a wild guess ...

    You're comparing return values with S_OK whereas MSDN documentation lists WBEM_S_NO_ERROR

    http://msdn.microsoft.com/en-us/library/aa391769(v=vs.85).aspx
Results 1 to 25 of 440
Page 1 of 18 1 2 3 4





Click Here to Expand Forum to Full Width

Featured