User Profile

Collapse

Profile Sidebar

Collapse
ShadowLocke
ShadowLocke
Last Activity: Sep 25 '09, 06:47 PM
Joined: Jan 3 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I figured it out. I was using the correct API call, I just needed to specify the fully qualified AD server name.

    I was passing just 'LDAP://mydomain' for ADsPath which worked on computers already connected because it would automatically search for it using some AD service.

    I needed to be passing 'LDAP://myADserver.mydo main.org' which now works on all computers.
    See more | Go to post

    Leave a comment:


  • Active Directory Authentication from computer NOT on domain

    Is it possible to authenticate an AD user from a computer that is not on the domain?

    Currently I use the API ADsOpenObject to authenticate users, But on a computer that is not on the domain, I get 'Domain Not Found'.

    Is there another API call I can make from a computer that is not on the domain that would allow me to authenticate?
    See more | Go to post

  • ShadowLocke
    replied to Design Time double click code
    Here is a simple example:

    Code:
    [DefaultEvent("ue_preclick")]
    public class CustomButton : Button
    {	
    	public delegate void ue_postclick_handler(EventArgs e);
    	public event ue_postclick_handler ue_postclick;
    
    	public delegate void ue_preclick_handler(CancelEventArgs e);
    	public event ue_preclick_handler ue_preclick;
    
    	public delegate void ue_click_handler(EventArgs e);
    ...
    See more | Go to post

    Leave a comment:


  • ShadowLocke
    replied to Add event through IDE (VS2008 C#)
    in .NET
    Thats exactly what i was looking for. Lol..i felt crazy that i couldnt find it. The site mentioned above shows exactly that....
    See more | Go to post

    Leave a comment:


  • ShadowLocke
    replied to Design Time double click code
    No no, this was purely for design time. The double clicking is done inside of visual studio.

    For example, I (as a developer) drop my custom button on the form, then I double click it to goto the code behind of the form. VS automatically adds the click event for me. By putting the DefaultEvent attribute at the top of a custom control class, you can choose what event is automatically added by visual studio.

    Edit: ...
    See more | Go to post

    Leave a comment:


  • ShadowLocke
    replied to Design Time double click code
    Garr..jumped the gun again..


    System.Componen tModel.DefaultE vent
    See more | Go to post

    Leave a comment:


  • ShadowLocke
    replied to Add event through IDE (VS2008 C#)
    in .NET
    Ah..i found it

    http://msdn.microsoft.com/en-us/library/ms366768.aspx...
    See more | Go to post

    Leave a comment:


  • ShadowLocke
    started a topic Add event through IDE (VS2008 C#)
    in .NET

    Add event through IDE (VS2008 C#)

    This may be a silly question, but how can one add an event through the IDE?

    i.e. I place a button on the form design time..double click it automatically adds the click event for me. How do I add another event say..VisibleCha nged?

    Usually I would edit Form1.Designer. cs myself, but for less experienced programmers it could get a little confusing (i.e. VS would overwrite changes if not done properly)
    See more | Go to post

  • ShadowLocke
    started a topic Design Time double click code

    Design Time double click code

    I have a custom button class that inherits from 'System.Windows .Forms.Button' and i want to change the default behavior during design time when it is double clicked. i.e. when a developer doubleclicks the button it should add code for a custom event rather than the normal click event.

    Any ideas?
    See more | Go to post

  • ShadowLocke
    replied to Char***
    in C
    Well i cant really figure it out..

    The function I call is defined as "int GetWords(char** * slst);"

    Though i just figured out my problem (blindly troubleshooting and playing)

    I changed:

    Code:
    *(lst[i])
    to:

    Code:
    (*lst)[i]
    and it worked!

    Thanks!
    See more | Go to post

    Leave a comment:


  • ShadowLocke
    started a topic Char***
    in C

    Char***

    Im having trouble in the c++ world grasping char arrays.

    Im given a char*** from a thrid party function and i want to loop through the returned strings and just message box them.

    This is what i have:

    Code:
    	char ***lst;
    	ll_cnt = GetWords(lst);
    
    	for(int i = 0; i < ll_cnt; i++)
    	{
    		MessageBox(0, str, *(lst[i]), 0);
    	}
    It works the first time, where...
    See more | Go to post

  • ShadowLocke
    replied to DLL export array reference to C#
    in C
    One..the question was about passing arrays from c# to c++ and back..not memory checking and error proofing..that is something do be done after I figured out the problem at hand.. Two..reading the material that you gave (after digging further around in to find something that remotly addressed the issue at hand [http://msdn.microsoft.com/en-us/library/hk9wyw21.aspx]) makes the same assumption about strings (Im gonna go ahead and take MSDN's word on...
    See more | Go to post

    Leave a comment:


  • ShadowLocke
    replied to DLL export array reference to C#
    in C
    Problem solved with this:

    c++
    Code:
    __declspec(dllexport) int __stdcall Test(LPCTSTR ** as_test)
    {
    	_tcscpy((wchar_t*)as_test[0], TEXT("a result."));
    
    	return 3;
    }
    c#
    Code:
    [DllImportAttribute("PBNI.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)]
                public static extern void Test([In, Out] String[] as_test);
    ...
    See more | Go to post

    Leave a comment:


  • ShadowLocke
    replied to DLL export array reference to C#
    in C
    Taking the array element out of the picture everything works as expected. I'm getting results, just not what im asking for. I need to return an edited array parameter..

    Passing the array of strings, in the c++ code I am able to messagebox(0, as_test[any index], L"", 0) and see that each string is indeed there. So the pointer in is working.

    I think i will end up turning the array into a delemited string but...
    See more | Go to post

    Leave a comment:


  • ShadowLocke
    replied to DLL export array reference to C#
    in C
    I've gotten a step closer by changing the c++ code to this..

    Code:
    __declspec(dllexport) int __stdcall Test(LPCWSTR * &as_test)
    { 
    	_tcscpy((wchar_t*)as_test[0], L"new data");
    
    	return 0;
    }
    But this replaces the string array with an array of the 1 element that was changed..I dont know why im losing the rest of the data
    See more | Go to post

    Leave a comment:


  • ShadowLocke
    replied to DLL export array reference to C#
    in C
    Thanks for the post, just gave it a try but still getting the same results :(
    See more | Go to post

    Leave a comment:


  • ShadowLocke
    started a topic DLL export array reference to C#
    in C

    DLL export array reference to C#

    I am trying to pass a string array from c# into c++ and manipulate the data of that array. How can I do this? (I am c++ newb)

    c++
    Code:
    __declspec(dllexport) int __stdcall Test(LPCTSTR* as_test)
    {
    	as_test[0] = L"This is new data";
                    return 0;
    }
    c#
    Code:
    [DllImport("PBNI.dll", CharSet = CharSet.Unicode)]
                static extern int Test(ref String[]
    ...
    See more | Go to post

  • just tried using

    Code:
    //catch //Wants a try..
    //{
    //CryptDecrypt(lp_key, 0, 1, 0, ref ls_temp, ref lul_length)
    //}
    
    try
    {
    CryptDecrypt(lp_key, 0, 1, 0, ref ls_temp, ref lul_length)
    }
    catch { }
    It gives the same error and does not catch.

    Im pretty sure I've got the right datatypes there..

    http://msdn.microsoft. com/en-us/library/a...
    See more | Go to post

    Leave a comment:


  • Its been implemented in an older application that it needs to be compatible with and I dont know how to translate the above into the .NET equalvalent
    See more | Go to post

    Leave a comment:


  • ShadowLocke
    started a topic CryptDecrypt 'System.ExecutionEngineException'
    in .NET

    CryptDecrypt 'System.ExecutionEngineException'

    Hi!

    I'm having a problem calling CryptDecrypt from .Net.

    Even thoug I call from inside a try catch block execution stops on the call with error "Exception of type 'System.Executi onEngineExcepti on' was thrown." with no extra information after that..

    Has anyone run into a problem like this before?

    Code:
    [DllImport("advapi32.dll", EntryPoint = "CryptAcquireContextW",
    ...
    See more | Go to post
No activity results to display
Show More
Working...