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
K

Kushagra Tiwari

@Kushagra Tiwari
About
Posts
127
Topics
26
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Unable to add event handler for Minimizing the Ribbon Control in WPF
    K Kushagra Tiwari

    Hi All, I am using the WPF ribbon Library in my application for getting a ribbon control attached in my application. I need the functionality where I can trap the minimize event in ribbon and do some additional stuff of code in there. But, to my surprise I could not find any property named Minimized in ribbon .. I could found out collapsed and Expanded but they were of no use. Can some body tell me what does IsMinimize property correspond to. As,if I know for which property the minimize functionality is attached,I can then easily solve my problem statement. -Kushagra I believe in Me !!!

    WPF csharp wpf help

  • Unable to add event handler for Minimizing the Ribbon Control in WPF
    K Kushagra Tiwari

    Hi All, I am using the WPF ribbon Library in my application for getting a ribbon control attached in my application. I need the functionality where I can trap the minimize event in ribbon and do some additional stuff of code in there. But, to my surprise I could not find any property named Minimized in ribbon .. I could found out collapsed and Expanded but they were of no use. Can some body tell me what does IsMinimize property correspond to. As,if I know for which property the minimize functionality is attached,I can then easily solve my problem statement. -Kushagra I believe in Me !!!

    C# csharp wpf help

  • Getting an Exception : (HRESULT: 0x800A140C ) while trying to close Word 2k10 Document
    K Kushagra Tiwari

    I finally got this sorted ... Looks there is some issue with Save() api of WOrd 2010 where its not able to decide which format to save the document in ... I used SaveAs() instead and then closed the Document... which worked wonders in my case.. -Kushagra

    C# com

  • Getting an Exception : (HRESULT: 0x800A140C ) while trying to close Word 2k10 Document
    K Kushagra Tiwari

    ManfredRBihy wrote:

    what is the value ofthe variable mArg. It's being used in some places where a boolean is expected, but also as the last parameter where no boolean is expected.

    mArg is nothing but NULL which specifies missing value to let the function decide its own default value. I will look for replacing the right parameters .. meanwhile if you find some good solution on this .. please let me know. -Kushagra

    C# com

  • Getting an Exception : (HRESULT: 0x800A140C ) while trying to close Word 2k10 Document
    K Kushagra Tiwari

    Hi all, I have tried to open an existing Word 2k10 document in mail merge format.

    private object tArg = true;
    private object fArg = false;
    private object wOriginalFormat = Microsoft.Office.Interop.Word.WdOriginalFormat.wdOriginalDocumentFormat;

    sourceDoc = word.Documents.Open(ref oSourceFile,//1The name of the document (paths are accepted).
    ref mArg,//2True to display the Convert File dialog box if the file isn't in Microsoft Word format.
    ref mArg,//3True to open the document as read-only.
    ref mArg,//4True to add the file name to the list of recently used files at the bottom of the File menu.
    ref mArg,//5The password for opening the document.
    ref mArg,//6The password for opening the template.
    ref mArg,//7Controls what happens if FileName is the name of an open document. True to discard any unsaved changes to the open document and reopen the file. False to activate the open document.
    ref mArg,//8The password for saving changes to the document.
    ref mArg,//9The password for saving changes to the template.
    ref wdOpenFormatAllWord,//10The file converter to be used to open the document. Can be one of the following WdOpenFormat constants
    ref fArg,//11The document encoding (code page or character set) to be used by Microsoft Word when you view the saved document.
    ref mArg,//12True if the document is opened in a visible window. The default value is True.
    ref mArg,//13Specifies whether to open the conflict file for a document with an offline conflict.
    ref mArg,//14True to repair the document to prevent document corruption.
    ref mArg,//15True to skip displaying the Encoding dialog box that Word displays if the text encoding cannot be recognized. The default value is False.
    ref mArg);//16Indicates the horizontal flow of text in a document. The default value is wdLeftToRight.

    a

    C# com

  • programing
    K Kushagra Tiwari

    CPallini wrote:

    (even in romance books, I guess).

    Ya .. if we are romancing with Computer :)

    C / C++ / MFC

  • Windows Service cannot access mapped network drive
    K Kushagra Tiwari

    Ranojay wrote:

    I have also came accros some posts where it is said to use CreateProcessAsUser function to launch the child process. But I could find a proper code to get the "Token Handle" to be used as a parameter to this function. Could you please help me in this area. ?

    For doing this .. First you will have to make the service as 'INTERACTIVE' as I mentioned in the earlier reply. Then if u are using the function CreateProcessAsUser() you will have to fallow the process as mentioned in this link : http://msdn.microsoft.com/en-us/library/aa379608(VS.85).aspx This should solve your problem. -Kushagra PS: If you like my Answers .. Please rate them ... That will give me a lot of confidence :)

    modified on Wednesday, September 29, 2010 9:23 AM

    C / C++ / MFC help sysadmin

  • Windows Service cannot access mapped network drive
    K Kushagra Tiwari

    Hi, The reason why you are able to access the drive in when you normally run the executable from command prompt is that when u are executing it as normal exe you are running that application in the User account from which you have logged on . And that user has the privileges to access the network. But , when you install the executable as a service , by default if you see in the task manage it runs under 'SYSTEM' account . And you might be knowing that the 'SYSTEM' doesn't have rights to access network resources. There can be two solutions to this problem. 1. As Sauro Viti already pointed out in the link he gave you , to map the drive as persistent. 2. There is one more approach that can be followed. If you open the service manager by typing in the 'services.msc'you can go to your service and in the properties of your service there is a logOn tab where you can specify the account as any other account than 'System' you can either start service from your own logged on user account or through 'Network Service'. When you do this .. the service can access any network component and drive even if they are not persistent also. To achieve this programmatically you can look into 'CreateService' function at http://msdn.microsoft.com/en-us/library/ms682450(v=vs.85).aspx and can set the parameter 'lpServiceStartName ' to 'NT AUTHORITY\NetworkService'. This will start your service under 'Network Service' account and then you are done. 3. You can also try by making the service as interactive by specifying SERVICE_INTERACTIVE_PROCESS in the servicetype parameter flag of your CreateService() function but this will be limited only till XP as Vista and 7 donot support this feature. Hope the solutions help you.. Let me know if this worked for you . -Kushagra

    C / C++ / MFC help sysadmin

  • Making an app single instance
    K Kushagra Tiwari

    I think you can make your class as singleton by making you contructors and destructor as private and publically expose a static method which will return the same instance once an instance is created. That shud take care of your problem.. Google for singleton class examples ..u will get loads of them .. -Kushagra

    C / C++ / MFC delphi business

  • calendar control
    K Kushagra Tiwari

    If you are using MFC or Win 32 :: Go for this : http://www.functionx.com/visualc/controls/monthcalendar.htm[^] OR http://www.functionx.com/visualc/controls/datepicker.htm[^] Hope it helps . -Kushagra

    C / C++ / MFC tutorial

  • lineCallbackFunc not returning message..... [modified]
    K Kushagra Tiwari

    You can look at these : [^] http://tapifaq.pennypacker.org/tapifaq3.html[^] Answering machine(TAPI 2.1)[^] Though the answer doesn't address your issue directly .. they might give u a proper direction. -Kushagra

    C / C++ / MFC delphi json question

  • MFC application(VS2008) does not execute in another computer
    K Kushagra Tiwari

    If you dont find a release mode then you can add it yourself in the configuration manager and copy settings from debug mode if required. We should never distribute an executable built in Debug mode to the production environment as application crash might result in unexpected popups. So , rebuild it in release mode in VS 2008 and if it still fails to run on the other machine you can install VS2008 redistributable on the machine and also try with the latest version of .Net framework. Also , try setting your VS2008 settings to VC++ environment from the tools tab PS: Please note ... debug version may be a short-term solution but it should always be avoided as it a box of worms in the long term. -Kushagra

    C / C++ / MFC help announcement csharp c++ visual-studio

  • Is Azure as Success story for MS ?
    K Kushagra Tiwari

    :-O

    The Lounge cloud question

  • Is Azure as Success story for MS ?
    K Kushagra Tiwari

    I was just wondering if azure is a win-win / loose-loose concept by microsoft. How does it makes its identity with Salesforce capturing almost all market ? What are your views ?

    The Lounge cloud question

  • How to fetch "User must change password at next logon" through LDAP authentication in ADSI?
    K Kushagra Tiwari

    Finally I was able to figure this stuff out... Check this out: http://msdn.microsoft.com/en-us/library/ms974598.aspx We will have to query for 'PasswordLastChanged' and if it fails with error code E_ADS_PROPERTY_NOTFOUND , then we have the password option set as 'User must change password at next logon'. Hope this helps someone in future. -Kushagra

    C / C++ / MFC question security help tutorial

  • How to fetch "User must change password at next logon" through LDAP authentication in ADSI?
    K Kushagra Tiwari

    that doesnot help me out... as I am working on ADSI and using LDAP just for authentication..

    C / C++ / MFC question security help tutorial

  • How to fetch "User must change password at next logon" through LDAP authentication in ADSI?
    K Kushagra Tiwari

    Hi all, Its been long but I am back with another puzzling question... Does anybody who has worked on ADSI can help me out to read 'User must change password at next logon' using LDAP. I do know how to set the values by using 'pwdlastset' but I am not able to search for a way to read it. Can somebody throw a light on it. -Kushagra

    C / C++ / MFC question security help tutorial

  • How to do?
    K Kushagra Tiwari

    Use a licensed antivirus software :)

    C / C++ / MFC design tutorial question

  • Help - Some Registry Settings not Applicable on Server.
    K Kushagra Tiwari

    There can be CurrentControlSet's for a server .. CurrentControlSet001 ,CurrentControlSet002 and soon so u will have to change values for all of them. Kushagra

    C / C++ / MFC sysadmin windows-admin help

  • How to get disk/drive size
    K Kushagra Tiwari

    Try using GetDiskFreeSpace Function which will accept driveletter as in parameter. It return's number of clusters available and all you need . Here see in msdn : http://msdn.microsoft.com/en-us/library/aa364935(VS.85).aspx[^] And you can get the drives available through GetLogicalDrives() API. Kushagra

    C / C++ / MFC json help tutorial
  • Login

  • Don't have an account? Register

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