• RELEVANCY SCORE 4.87

    DB:4.87:Wtsqueryusertoken() Returns False With Error Code 5 kd




    Our application process runs in local user account. We need to get the handle of the logged in domain user for impersonation.
    Calling the WTSQueryUSerToken() function returned false with error code 1314. So, we set the SE_TCB_NAME privilege using AdjustTokenPrivileges() function.
    After doing so, WTSQueryUserToken() returned false with error code 5.
    Could anyone please help me resolve this issue.

    DB:4.87:Wtsqueryusertoken() Returns False With Error Code 5 kd

    Hi Frank K
    Thanks for ur quick reply.
    Our applicationhas a service which runs under LocalSystem account. Application runs in Win 7 machine. How to get the handle from the service..?
    Requirement: Domain user is logged in as interactive user to our application. We need to get the handle of the logged in user for impersonation.
    We tried getting the handle of the logged in domain user, usingOpenProcessToken() API.
    But the handle refers to local user account in which our application process is running not the logged in domain user. We verified it using GetUserProfileDirectory() API.
    We dont want to useCredUIPromptForCredentials API as the user is already logged into our application.
    Is there any other way to get the logged in interactive domain user handle, which we can use in
    ImpersonateLoggedOnUser() API.

    Thanks in advance

  • RELEVANCY SCORE 3.36

    DB:3.36:Fail To Get User Token By Wtsqueryusertoken() 37




    We have modules which will work on Service session and Interactive session, and they are compiled as 32-bit, they will work as WOW64 on Windows XP(VISTA) 64-bit environment.
    When Service session module executes Interactive module, the sequence is:

    Get session id.
    We call WTSQueryUserToken to get user token in NT service process, which has LocalSystem account. 2-1. When first parameter of the API (SessionId) is 0, it succeeds. 2-2. When first parameter of the API (SessionId) is non-0, it always fails. Further, GetLastError returns ERROR_INSUFFICIENT_BUFFER (122L).
    Duplicate token for Interactive session with DuplicateTokenEx()
    In our original source codes (sorry, not the one attach here), it will further execute Interactive session module with CreateProcessAsUser()
    NOTE: Problem occurs on Windows XP 64-bit edition. not occur on Windows XP 32 and Vista 32 platforms.  We would like your help to see whether there anything wrong for the WTSQueryUserToken() on XP 64 platform? We attached the simplied code from original ones.

    HANDLE GetUserTokenOnUserSessionXP( DWORD dwSessionID){ TRACE1(dwSessionID: %d, dwSessionID);
     HANDLE hToken = NULL; if (::WTSQueryUserToken( dwSessionID, hToken) == FALSE) {  DWORD dwError = ::GetLastError();  TRACE2(WTSQueryUserToken failed: 0x%08X(%d), dwError, dwError);  TRACE2(hToken: 0x%08X(%d), hToken, hToken); } else {  TRACE0(WTSQueryUserToken succeeded); }
     HANDLE hPrimaryToken = NULL; if( !::DuplicateTokenEx( hToken, TOKEN_ALL_ACCESS, NULL, SecurityImpersonation, TokenPrimary, hPrimaryToken))  {  TRACE0( Failed DuplicateTokenEx());  ::CloseHandle( hToken);  return NULL; } ::CloseHandle( hToken);
     if( hPrimaryToken == INVALID_HANDLE_VALUE) {  TRACE0(   hPrimaryToken is INVALID_HANDLE_VALUE);  ::CloseHandle( hPrimaryToken);  return NULL; }
     ::TRACE2(hPrimaryToken: 0x%08X(%d), hPrimaryToken, hPrimaryToken);
     return hPrimaryToken;}
     

    DB:3.36:Fail To Get User Token By Wtsqueryusertoken() 37

    I know it's pretty late in the day to help some of you guys but there is a solution by RPC'ing the termsvr.dll directly (and preparing your own buffer!). This particular code is written in Delphi but it will be easy enough to translate this to C\C#
    if you require it. Hopefully in future people still supporting XP\Server 2003 without a 64-bit compiler for their language will find this useful, I know I did!
    http://www.remkoweijnen.nl/blog/2011/01/29/querying-a-user-token-under-64-bit-version-of-2003xp/
    Remko and daNIL have an awesome blog, there is so much detailed information there it's an excellent resource.
    Ross

  • RELEVANCY SCORE 3.33

    DB:3.33:Essentials Url Monitor Returns Error Code 2147954430 md




    Hi,
     
    Anyone any ideas with this? The application seems fine however Essentials gives this error code in the Base Page Error Code Failure:
     

    HTTP Status Code

    200

    Unreachable

    false

    Error Code

    2147954430

    DNS Resolution Failure

    false

    DNS Resolution Time (ms)

    0
     
     Next check and it's all good again.

    DB:3.33:Essentials Url Monitor Returns Error Code 2147954430 md

    Error code 2147954430 here too. It's simple to avoid alerts created when you configure your subscription so that it only sends an email if the condition persists for more then 10 minutes or so. But the closed alert is still sent, which is pretty annoying.
    It would be so nice to be just able to make an override on a certain error code.
    Not monitoring on error code is not an option because I saw several time a web application go down while only the error code monitor goes critical....

  • RELEVANCY SCORE 3.02

    DB:3.02:Got An Exception When Start A Process From Service Using Createprocessasuser Method f7


    Hi,I am explain my problem when i am faced with a windows vista and xp working properly.I want to create interactive Process from windows service using  a createprocessasUser in user's session for that this is my vb.net code.    1. Get a Current active session from this code.
    Dim dsessionID As IntPtr = WTSGetActiveConsoleSessionId()    2. Call a function for the Get a Token of given session
    If Not WTSQueryUserToken(dsessionID, token) Then    Throw new ex
    End If    3. after that duplicate token
    If Not DuplicateTokenEx(New HandleRef(Me, token), MAXIMUM_ALLOWED, securityAttributes, SECURITY_IMPERSONATION, TOKEN_PRIMARY, primaryUserToken) Then
     
    TestService.Test.TextFileLogging(Create Duplicate process)
    Throw New Win32Exception
    End If
        4.    Create a Environment block
    If CreateEnvironmentBlock(pEnv, primaryUserToken, 1) Then
     
    dwCreationFlags = dwCreationFlags Or CREATE_UNICODE_ENVIRONMENT
    TestService.Test.TextFileLogging(Create Env. Block)
    Else
     
    pEnv = Nothing
     
    End If
    5. and then createprocess as user
    If Not CreateProcessAsUser(primaryUserToken, Nothing, commandLine, Nothing, Nothing, False, _
    dwCreationFlags, pEnv, workingDirectory, startupInfo, processInformation) Then
     
    TestService.Test.TextFileLogging(Start ProcessW)
    If (System.Environment.OSVersion.Version.Major = 6) Then
     
    '' Vista OS and User is not the administrator
     
    Throw New ApplicationException(Can not create process. This could happens because you're not using Administrator account)
    End If
     
    Throw New Win32Exception
    End If
    Everything work fine and properly run in XP. but in VISTA and win-2003 server start a process with session 1 but give a exception and crashe my whole application with this error. and end that process when press ok or cancel.WindowsApplication1.exe - Application Error---------------------------The exception unknown software exception (0xc06d007e) occurred in the application at location 0x77e4bee7.---------------------------OK   Cancel  Please give me sugession what should i do?Thanks in Advance

    DB:3.02:Got An Exception When Start A Process From Service Using Createprocessasuser Method f7

    Hi,I am explain my problem when i am faced with a windows vista and xp working properly.I want to create interactive Process from windows service using  a createprocessasUser in user's session for that this is my vb.net code.    1. Get a Current active session from this code.
    Dim dsessionID As IntPtr = WTSGetActiveConsoleSessionId()    2. Call a function for the Get a Token of given session
    If Not WTSQueryUserToken(dsessionID, token) Then    Throw new ex
    End If    3. after that duplicate token
    If Not DuplicateTokenEx(New HandleRef(Me, token), MAXIMUM_ALLOWED, securityAttributes, SECURITY_IMPERSONATION, TOKEN_PRIMARY, primaryUserToken) Then
     
    TestService.Test.TextFileLogging(Create Duplicate process)
    Throw New Win32Exception
    End If
        4.    Create a Environment block
    If CreateEnvironmentBlock(pEnv, primaryUserToken, 1) Then
     
    dwCreationFlags = dwCreationFlags Or CREATE_UNICODE_ENVIRONMENT
    TestService.Test.TextFileLogging(Create Env. Block)
    Else
     
    pEnv = Nothing
     
    End If
    5. and then createprocess as user
    If Not CreateProcessAsUser(primaryUserToken, Nothing, commandLine, Nothing, Nothing, False, _
    dwCreationFlags, pEnv, workingDirectory, startupInfo, processInformation) Then
     
    TestService.Test.TextFileLogging(Start ProcessW)
    If (System.Environment.OSVersion.Version.Major = 6) Then
     
    '' Vista OS and User is not the administrator
     
    Throw New ApplicationException(Can not create process. This could happens because you're not using Administrator account)
    End If
     
    Throw New Win32Exception
    End If
    Everything work fine and properly run in XP. but in VISTA and win-2003 server start a process with session 1 but give a exception and crashe my whole application with this error. and end that process when press ok or cancel.WindowsApplication1.exe - Application Error---------------------------The exception unknown software exception (0xc06d007e) occurred in the application at location 0x77e4bee7.---------------------------OK   Cancel  Please give me sugession what should i do?Thanks in Advance

  • RELEVANCY SCORE 2.91

    DB:2.91:Strange Behavior Of Wtsgetactiveconsolesessionid Issue On Vista And Above c8


    Hi,
    I am trying to launch a process suing CreateProcessAsLoggedOnUser. Before that I enumerate all sessions for log its name, id and state. Then I call WTSGetActiveConsoleSessionId which returns a session id. With this id, I can know the name and state of the
    session.

    Now, when I am logged in the system (desktop is seen), I see in the log that session name is Console and state is active (0) and session id is equal to session id returned by WTSGetActiveConsoleSessionId .
    Then I lock the desktop (desktop is not seen), I see in the log same as above.
    But if I click on switch user and run my program, what I see is quite strange to me. I see that Console session state is connected but WTSGetActiveConsoleSessionId returns a session id of Console.
    From above what I understand is that WTSGetActiveConsoleSessionId returns active session id but the session is actually in connected state when I enumerate sessions.
    WTSQueryUserToken succeeds only when session is in active state. My requirement is to launch an exe in the context of any logged on/in user which is happening in my case.
    If anybody put some light on it, I would appreciate it.
    Thank you.

    DB:2.91:Strange Behavior Of Wtsgetactiveconsolesessionid Issue On Vista And Above c8

    If you want to launch a process into the session of the interactively logged on user, you only need to enumerate all the sessions and search for the WTSActive session. On client systems such as Windows VISTA, Windows 7 and Windows 8, there will only
    be 1 active session. This session may or may not be associated with the physical console session. Calling WTSGetActiveConsoleSessionId() is unnecessary unless you want to only launch an application on an WTSActive session and it is attached to
    the physical console. If not, you have to consider that the physical console maybe attached to a disconnected session or to a dummy session or the system is in the process of assigning a session to the physical console session.Trevor Hancock (Microsoft)
    Please remember to Mark As Answer the replies that help.

  • RELEVANCY SCORE 2.84

    DB:2.84:Io Completion Ports fd


    Hi,

    I'm writing some server application and I want to use IOCompletion ports, so I wrote a prototype for the server, but I'm facing a problem with GetQueuedCompletionStatus that it never returns(it blocks). Below is my code:

    bool CreateSocketOverlappedServer()
    {
    WSADATA wsaData;
    SOCKADDR_IN sockaddr;

    if(WSAStartup(MAKEWORD(2,2,),wsaData)){
    _tprintf(_T(Unable to start up\n));
    return false;
    }

    SrvSocket = WSASocket(AF_INET,SOCK_STREAM,0,NULL,NULL,WSA_FLAG_OVERLAPPED);
    if(SrvSocket==INVALID_SOCKET){
    _tprintf(_T(Unable to start socket\n));
    return false;
    }

    sockaddr.sin_family = AF_INET;
    sockaddr.sin_port = htons(10000);
    sockaddr.sin_addr.s_addr = INADDR_ANY;

    /* now bind the socket */
    if(bind(SrvSocket, (SOCKADDR *)sockaddr, sizeof(SOCKADDR_IN))==SOCKET_ERROR){
    _tprintf(_T(Unable to bind socket\n));
    return false;
    }

    if(listen(SrvSocket, 5)==SOCKET_ERROR){
    _tprintf(_T(Error listening\n));
    return false;
    }

    return true;
    }

    DB:2.84:Io Completion Ports fd

    Hi,

    Welcome to the MSDN forum.

    I am moving this thread to the Windows Desktop Winsock kernel(WSK) forum for better support.

    Thanks for your understanding.
    Best regards,

    Helen Zhao[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • RELEVANCY SCORE 2.83

    DB:2.83:Movetochild Or Selectchildren Method Not Working In Foreach Loop 19


    I have thefollowing code that loops through the XPathNodeIterator CPDDosimeterDataNodes. Although there are child nodes with the local name CPDType, the MoveToChild method returns a false and
    the SelectChildren.Count method returns a 0.

    DB:2.83:Movetochild Or Selectchildren Method Not Working In Foreach Loop 19

    Yes, I get that these are repeating (why else would you need to count), but you don't need to loop through just to count. Do you really need this in code anyway? I always go with what's built into InfoPath before I resort to coding.
    You can add a field calledcpdTypeCount, edit the default value, insert the count() function, and insert the CPDType field into the parenthesis
    Then, if you do need the value in code all you do is pull in the cpdTypeCount field's value.

  • RELEVANCY SCORE 2.83

    DB:2.83:Createprocessasuser Memory Leak 1c


    Hello,

    I have a service that run the following code.
    Every time that CreateProcessAsUser is hit, the memory increase in 4K (I can see it in the Task Manager).
    Where am I wrong?

    PWTS_SESSION_INFO pSessionInfo = 0;
    DWORD dwCount = 0;
    int dwSessionId = 0;
    WTSEnumerateSessions(WTS_CURRENT_SERVER_HANDLE, 0, 1, pSessionInfo, dwCount);
    for(DWORD i = 0; i dwCount; i)
    {
    WTS_SESSION_INFO si = pSessionInfo[i];
    if (WTSActive == si.State)
    {
    dwSessionId = si.SessionId;
    break;
    }
    }
    WTSFreeMemory(pSessionInfo);
    HANDLE currentToken;
    BOOL bRet = WTSQueryUserToken(dwSessionId, currentToken);
    if (bRet == false)
    {
    return 0;
    }
    PROCESS_INFORMATION pi;
    STARTUPINFO si;
    memset(si, 0, sizeof(si));
    si.cb = sizeof(si);
    if (CreateProcessAsUser(currentToken, MY_EXE.exe, MY_ARGS_STR, NULL, NULL, false, 0, NULL, NULL, si, pi))
    {
    if (pi.hProcess != NULL)
    {
    CloseHandle(pi.hProcess);
    }
    if (pi.hThread != NULL)
    {
    CloseHandle(pi.hThread);
    }
    }
    CloseHandle(currentToken);
    return 0;

    DB:2.83:Createprocessasuser Memory Leak 1c

    Hi,

    Welcome here.

    Based on your description, your issue is about CreateProcessAsUser API, so I’d like to move this thread to Microsoft SDK for better support.

    Thanks for your understanding.
    Regards,Elegentin Xie
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • RELEVANCY SCORE 2.81

    DB:2.81:Kb976932 It Always Returns With The Error Code 800b0100 m1


    I continue to get an error trying to run the Windows Service Pack 1 for 64 bit systems - KB976932; it always returns with the error code 800B0100; I've run the automatic trouble shooter; it says it found a problem and fixed it, but the error still occurs
    - any thoughts?

    DB:2.81:Kb976932 It Always Returns With The Error Code 800b0100 m1

    Mine is a 32bit system, so I adapted accordingly and did the manual install. It worked for me. Thanks!

  • RELEVANCY SCORE 2.78

    DB:2.78:Cr4e 1.0 Outofmemoryerror dp



    I am trying to evaluate running reports on RAS vs CR4E. I have a report which returns 1 row data based on the parameters. This report runs in Crystal for Eclipse environment. When this report is tried to generate with in the JSF application, it throws OutOfMemory error always

    JRCAgent1 detected an exception: java.lang.OutOfMemoryError

    I had to restart the application server to try once again. Here is the code which returns the report to the JSF div tag. This works fine when connected to RAS server.

    UIReportPageViewer viewer = new UIReportPageViewer();

    //CrystalReportViewer viewer = new CrystalReportViewer();

    viewer.setRendererType("CrystalReports.ViewerHtmlRenderer");

    viewer.setValueBinding("reportSource", Util.createValueBinding("#{" + MANAGED_BEAN_NAME + ".reportSource}"));

    viewer.setDisplayToolbarPrintButton(true);

    viewer.setPrintMode(CrPrintMode.PDF);

    viewer.setZoomPercentage(100);

    viewer.setDisplayToolbarExportButton(true);

    viewer.setDisplayToolbarRefreshButton(false);

    viewer.setViewerName("Standard Reports Viwer");

    viewer.setAllowDatabaseLogonPrompting(false);

    viewer.setAllowParameterPrompting(false);

    viewer.setDisplayToolbarLogo(false);

    viewer.setDisplayGroupTree(false);

    viewer.setDisplayToolbarFindButton(true);

    reportPageViewerDiv.getChildren().add(viewer);

    Thanks,

    DB:2.78:Cr4e 1.0 Outofmemoryerror dp


    The difference between the RAS and CR4E is that, for RAS, the report is processed out-of-process on the RAS server, while it's in-process for CR4E.

    So you need to supply a lot more heap to the CR4E Java process.

    Sincerely,

    Ted Ueda

  • RELEVANCY SCORE 2.73

    DB:2.73:Map.Containskey() With Equals() Overide In Key Object Class kp


    My objective is to be able to pass an object to the Map.containsKey() method. The Object will be a Parc object created with a user-submitted String as the name parameter like such:

    Parc aParc = new Parc(userSubmitedString);I have overidden the equals(), hashCode() and compareTo() methods as indicated at the end of this post.

    Although two Parc objects compared with equals() return true, the same two objects used with containsKey() on the map return false, and I am at a loss as to why.

    I use the following code:

    while (ligneText != null)
    {
    StringTokenizer ligneAdST = new StringTokenizer(ligneText, "\t");
    String name = ligneAdST.nextToken();
    String ville = ligneAdST.nextToken();
    String etat = ligneAdST.nextToken();

    // create two Parc objects with the same values
    Parc testParc1 = new Parc(name, ville, etat);
    Parc testParc2 = new Parc(name, ville, etat);

    // test these two Parc objects for equals()
    System.out.println("testParc1.equals(testParc2) returns : " + testParc1.equals(testParc2));

    // test these for compareTo()
    System.out.println("testParc1.compareTo(testParc2) returns : " + testParc1.compareTo(testParc2));

    // test hashCode()
    System.out.println("testParc1.hashCode() = " + testParc1.hashCode());
    System.out.println("testParc2.hashCode() = " + testParc2.hashCode());
    System.out.println("*");

    // put in map, test for key with each Parc object
    parcMap.put(testParc1, new TreeSetManege());
    System.out.println("parcMap.containsKey(testParc1) returns : " + parcMap.containsKey(testParc1));
    System.out.println("parcMap.containsKey(testParc2) returns : " + parcMap.containsKey(testParc2));
    System.out.println("__________________________________________");

    ligneText = ficLecture.readLine();
    }In the Parc class, I have overidden the equals method like this :

    public int hashCode ()
    {
    return name.hashCode();
    }

    public boolean equals (Parc autreParc)
    {
    return name.equals(autreParc.getNom());
    }

    public int compareTo(Parc autreParc)
    {
    return name.compareTo(autreParc.getNom());
    }The output is this:

    --------------------Configuration: Default--------------------
    testParc1.equals(testParc2) returns : true
    testParc1.compareTo(testParc2) returns : 0
    testParc1.hashCode() = 987935547
    testParc2.hashCode() = 987935547
    *
    parcMap.containsKey(testParc1) returns : true
    parcMap.containsKey(testParc2) returns : false
    __________________________________________
    testParc1.equals(testParc2) returns : true
    testParc1.compareTo(testParc2) returns : 0
    testParc1.hashCode() = 1932898240
    testParc2.hashCode() = 1932898240
    *
    parcMap.containsKey(testParc1) returns : true
    parcMap.containsKey(testParc2) returns : false
    __________________________________________
    testParc1.equals(testParc2) returns : true
    testParc1.compareTo(testParc2) returns : 0
    testParc1.hashCode() = 2028787369
    testParc2.hashCode() = 2028787369
    *
    parcMap.containsKey(testParc1) returns : true
    parcMap.containsKey(testParc2) returns : false
    __________________________________________
    testParc1.equals(testParc2) returns : true
    testParc1.compareTo(testParc2) returns : 0
    testParc1.hashCode() = 1524209842
    testParc2.hashCode() = 1524209842
    *
    parcMap.containsKey(testParc1) returns : true
    parcMap.containsKey(testParc2) returns : false
    __________________________________________
    testParc1.equals(testParc2) returns : true
    testParc1.compareTo(testParc2) returns : 0
    testParc1.hashCode() = 493387687
    testParc2.hashCode() = 493387687
    *
    parcMap.containsKey(testParc1) returns : true
    parcMap.containsKey(testParc2) returns : false
    __________________________________________
    testParc1.equals(testParc2) returns : true
    testParc1.compareTo(testParc2) returns : 0
    testParc1.hashCode() = -1678334685
    testParc2.hashCode() = -1678334685
    *
    parcMap.containsKey(testParc1) returns : true
    parcMap.containsKey(testParc2) returns : false
    __________________________________________
    testParc1.equals(testParc2) returns : true
    testParc1.compareTo(testParc2) returns : 0
    testParc1.hashCode() = 315768563
    testParc2.hashCode() = 315768563
    *
    parcMap.containsKey(testParc1) returns : true
    parcMap.containsKey(testParc2) returns : false
    __________________________________________
    testParc1.equals(testParc2) returns : true
    testParc1.compareTo(testParc2) returns : 0
    testParc1.hashCode() = 666588597
    testParc2.hashCode() = 666588597
    *
    parcMap.containsKey(testParc1) returns : true
    parcMap.containsKey(testParc2) returns : false
    __________________________________________
    testParc1.equals(testParc2) returns : true
    testParc1.compareTo(testParc2) returns : 0
    testParc1.hashCode() = -356824284
    testParc2.hashCode() = -356824284
    *
    parcMap.containsKey(testParc1) returns : true
    parcMap.containsKey(testParc2) returns : false
    __________________________________________
    testParc1.equals(testParc2) returns : true
    testParc1.compareTo(testParc2) returns : 0
    testParc1.hashCode() = -88259342
    testParc2.hashCode() = -88259342
    *
    parcMap.containsKey(testParc1) returns : true
    parcMap.containsKey(testParc2) returns : false
    __________________________________________
    testParc1.equals(testParc2) returns : true
    testParc1.compareTo(testParc2) returns : 0
    testParc1.hashCode() = -158255529
    testParc2.hashCode() = -158255529
    *
    parcMap.containsKey(testParc1) returns : true
    parcMap.containsKey(testParc2) returns : false
    __________________________________________
    testParc1.equals(testParc2) returns : true
    testParc1.compareTo(testParc2) returns : 0
    testParc1.hashCode() = -746474243
    testParc2.hashCode() = -746474243
    *
    parcMap.containsKey(testParc1) returns : true
    parcMap.containsKey(testParc2) returns : false
    __________________________________________

    Process completed.

    DB:2.73:Map.Containskey() With Equals() Overide In Key Object Class kp

    1000 apologies, and as many thanks!

    I would mark this as answered, but I had a problem with the account I originally posted with.

    Edited by: Jupiter_23 on Feb 23, 2008 12:17 PM

  • RELEVANCY SCORE 2.69

    DB:2.69:Rfc - Error = E=28 Semget(20072,1,2047) (28: No Space Left On Device) j7



    Hi Experts,

    when we enter the rfc destination, we are getting this error,

    "User password invalid for identifier /RFC/EWTCLNT100 (see long text)"

    also we can not edit the RFC's LogonSecurity tab, we get this error when we try to update logon informations,

    "Internal error in secure store",

    we have checked the "dev_w0" file and found these errors;

    I *** ERROR = e=28 semget(20072,1,2047) (28: No space left on device) [semux.c 928]

    N *** ERROR = RSEC: SemInit(72) failed with RC=1 [rsecxdb.c 509]

    I *** ERROR = e=28 semget(20072,1,2047) (28: No space left on device) [semux.c 928]

    N *** ERROR = RSEC: SemInit(72) failed with RC=1 [rsecxdb.c 2452]

    N *** ERROR = RSEC: rsecxdb__FillSystemDependentData(FALSE) returns -6 [rsecxdb.c 402]

    N *** ERROR = RSEC: Error code -6 occurred for identifier "/RFC/EETCLNT100", (client independent) [rsecxdb.c 294]

    I *** ERROR = e=28 semget(20072,1,2047) (28: No space left on device) [semux.c 928]

    N *** ERROR = RSEC: SemInit(72) failed with RC=1 [rsecxdb.c 509]

    I *** ERROR = e=28 semget(20072,1,2047) (28: No space left on device) [semux.c 928]

    N *** ERROR = RSEC: SemInit(72) failed with RC=1 [rsecxdb.c 2452]

    N *** ERROR = RSEC: rsecxdb__FillSystemDependentData(FALSE) returns -6 [rsecxdb.c 402]

    N *** ERROR = RSEC: Error code -6 occurred for identifier "/RFC/EETCLNT100", (client independent) [rsecxdb.c 294]

    How can we prevent these errors,

    Regards

    DB:2.69:Rfc - Error = E=28 Semget(20072,1,2047) (28: No Space Left On Device) j7


    This won't solve the root cause.

    You ran out of segments if you didn't specify the parameters in the given note. Once the system will start again using more segments the problem will reoccur.

    Enter those parameters, they are necessary (/etc/system is no more used on Solaris 10).

    Markus

  • RELEVANCY SCORE 2.68

    DB:2.68:Get-Aduser With A Filter Returns Unexpected Results 3p


    Hello,
    I was trying to filter AD users by the following conditions:
    - user's password is not expired, which means the user is not locked out;
    - the user is enabled, which means it's not terminated;
    - the password will expire after while, which means that this is not a service account.
    To do this I use the query below. But the query returns two users with expired passwords, I don't understand, how could it be?

    It is stated in the filter that PasswordExpired -eq 'False', how it could return users with
    PasswordExpired -eq 'True' ??????
    Get-ADUser -filter PasswordExpired -eq 'False' -and Enabled -eq 'True' -and PasswordNeverExpires -eq 'False' -SearchBase OU=LOCUSERS,DC=Enkata,DC=com-properties PasswordExpired, PasswordNeverExpires | ft -prop givenName, PasswordExpired, PasswordNeverExpires
    -AutoSize

    givenName PasswordExpired PasswordNeverExpires
    --------- --------------- --------------------
    Vyacheslav False False
    Andrey False False
    Anatoly False False
    Konstantin False False
    Julia False False
    Raida False False
    Alexey False False
    Andrey False False
    Roman False False
    Alexander False False
    Sergey False False
    Alexander False False
    Pavel False False
    Sergey False False
    Peter False False
    Ivan False False
    Vitaly False False
    Julia False False
    Denis False False
    Stanislav False False
    Ivan False False
    Roman False False
    Alexey True False
    Andrey False False
    Pavel False False
    Marina False False
    Vitaly False False
    Andrey False False
    Alexander False False
    Alexander False False
    Alexey False False
    Andrey True False
    Alexey False False
    Alexey False False
    Sergey False False
    Alexander False False
    Elena False False
    Alexander False False
    Vladimir False False
    Julia False False
    Yuri False False
    Andrey False False
    Raphael False False
    Kirill False False
    Ivan False False
    Eugene False False
    Konstantin False False
    Ekaterina False False
    Alexander False False
    Eugene False False
    Andrey False False
    Konstantin False False
    Vladislav False False
    Victoria False False
    Ekaterina False False
    Oleg False False
    Alexey False False
    Maria False False

    DB:2.68:Get-Aduser With A Filter Returns Unexpected Results 3p

    Hi,
    I would like to the issue status? Have you tried the what Kazun suggested script? How about the result.
    If there is anything further we could do for you, please feel free let us know.
    Regards,
    Yan Li
    TechNet Subscriber Support
    If you are
    TechNet Subscription
    user and have any feedback on our support quality, please send your feedback
    here.Yan Li
    TechNet Community Support

  • RELEVANCY SCORE 2.67

    DB:2.67:How To Instantiate Public Key 7p


    hi,

    I have a problem when I try to instanciate a RSAPublicKey from javacard with this code :

    publicKey = (RSAPublicKey) KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_PUBLIC, KeyBuilder.LENGTH_RSA_1024, false);

    this returns the error code 6f 00.

    please help again!

    DB:2.67:How To Instantiate Public Key 7p

    The issue with the key was due to optimisations the JCVM does to save space. Since an RSA key is made up of positive integers, there will be a 0x00 byte at the front of the key if the first bit is set in the key data (1xxx xxxx). JC does not mind that the integer is negative and handles that internally. This way the card only has to deal with a fixed size key value.

    As for the MD5 issue, you should check the document cJDK_Users_Guide.pdf that ships with the JCDK. The section Using Cryptography Extensions outlines the crypto limitations of CREF and JCWDE. You can only use SHA1. You probably shouldn't rely on MD5 anyway as it is inherently insecure :)

    Cheers,
    Shane

  • RELEVANCY SCORE 2.63

    DB:2.63:Carrier Overrides Http Error Code... 77



    Hello all,

    I am trying to connect to my web server and we use HTTP error codes so for example if there is no update available my web server returns HTTP error code 404!

    Now the problem is that my carrier overrides this HTTP error code... and change it to a HTTP 200 with a page saying "The carrier can't find your page"...

    I thought it was only in the mobile browser but it also affects my Java application...

    What can I do? Should I change the content-type returned by my web server? I tried to change to deviceside=false but it didn't work...

    Thanks for your help!!







    Solved!
    Go to Solution.

    DB:2.63:Carrier Overrides Http Error Code... 77


    So, I tried with https and the URL suffix ;EndToEndDesired and it worked thanks for the help!

  • RELEVANCY SCORE 2.62

    DB:2.62:Duplicatehandle() Returns Error Code 87 (Error_Invalid_Parameter) xz


    I'm having trouble with the function DuplicateHandle().  I can't seem to get it to work.  I created a new simple project in Visual Studio 2005 and ran it and 'error' is still getting the value 87.#include stdafx.h#include windows.h#include commctrl.hint _tmain(int argc, _TCHAR* argv[]){    HANDLE targetHandle = 0;    DuplicateHandle(        GetCurrentProcess(),        GetCurrentThread(),        GetCurrentProcess(),        targetHandle,        0,        FALSE,        DUPLICATE_SAME_ACCESS    );    DWORD error = GetLastError();    return 0;}

    DB:2.62:Duplicatehandle() Returns Error Code 87 (Error_Invalid_Parameter) xz

    The second parameter to the DuplicateHandle() call is invalid.  From the help:
    DuplicateHandle can duplicate handles only to the types of objects in the following table.

    Handle
    Description

    Event
    Returned by CreateEvent or OpenEvent.

    Mutex
    Returned by CreateMutex.

    Semaphore
    Returned by CreateSemaphore.

  • RELEVANCY SCORE 2.60

    DB:2.60:Determine The Current Active Session Of User In Windows Server 2008 sd


    Hi,
    I have an requirement of invoking a batch file through terminal services.
    I have used CreateProcessAsUSer API to invoke an batch from service.

    This method used to work fine in WindowsXP. To make it work for Windows Vista and Windows 7

    operating system as sessionid is different for applications and services I was forced to add below code to get the token associated with the sessionid related to user.

    DWORD dwSessionid = GetActiveSessionId();

    //get Active UI session
    bRet = WTSQueryUserToken (dwSessionid, hTokenthis);

    if (!LookupPrivilegeValue(NULL,SE_DEBUG_NAME,luid))
    {
    printf(Lookup Privilege value Error: %u\n,GetLastError());
    }
    tp.PrivilegeCount =1;
    tp.Privileges[0].Luid =luid;
    tp.Privileges[0].Attributes =SE_PRIVILEGE_ENABLED;

    bRet = false;
    bRet = DuplicateTokenEx(hTokenthis, MAXIMUM_ALLOWED,NULL, SecurityIdentification, TokenPrimary, htoken);

    //Adjust Token privilege
    SetTokenInformation(hTokenthis,TokenSessionId,(void*)dwSessionid,sizeof(DWORD));

    if (!AdjustTokenPrivileges(hTokenthis,FALSE,tp,sizeof(TOKEN_PRIVILEGES),(PTOKEN_PRIVILEGES)NULL,NULL))
    {
    int abc =GetLastError();
    printf(Adjust Privilege value Error: %u\n,GetLastError());

    }

    if (GetLastError()== ERROR_NOT_ALL_ASSIGNED)
    {
    printf(Token does not have the provilege\n);
    }

    LPVOID pEnv =NULL;

    if(CreateEnvironmentBlock(pEnv,hUserTokenDup,TRUE))
    {
    dwCreationFlags|=CREATE_UNICODE_ENVIRONMENT;
    }
    else
    pEnv=NULL;

    -----------------------------------

    Call CreateProcessAsUser
    -----------------------------------

    //Definition of GetActiveSessionId
    DWORD GetActiveSessionId()
    {
    PHANDLE currentToken = 0;
    PHANDLE primaryToken = 0;

    int dwSessionId = 0;
    PHANDLE hUserToken = 0;
    PHANDLE hTokenDup = 0;

    PWTS_SESSION_INFO pSessionInfo = 0;
    DWORD dwCount = 0;

    WTSEnumerateSessions(WTS_CURRENT_SERVER_HANDLE, 0, 1, pSessionInfo, dwCount);

    int dataSize = sizeof(WTS_SESSION_INFO);

    for (DWORD i = 0; i dwCount; i)
    {
    WTS_SESSION_INFO si = pSessionInfo[i];
    if (WTSActive == si.State)
    {
    dwSessionId = si.SessionId;
    break;
    }
    }

    return dwSessionId;
    }

    After adding the above code, my code works for XP, Vista and Windows 7. BUT, Windows Server 2008
    can have more than one active sessions at a time and it also allows the same user to login from machines. For ex: Server 2008 allows the user Administrator to login to in x machine and with the same user Administrator server 2008 allows to login from y
    machine. Therefore there can be more than one active sessions from same/different users.

    Is there any way to determine the current Active session of user?

    DB:2.60:Determine The Current Active Session Of User In Windows Server 2008 sd

    Hi Dayakar,

    I think your issue should be raised in theGeneral Windows Development Issues.
    I believe they will know more information of this issue than us, and I will move this one to that forum.

    Thanks for your understanding,

    Best regards,
    JesseJesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • RELEVANCY SCORE 2.56

    DB:2.56:Posting Xml To Rest Interface ks


    Hi,

    I have a rest interface that excepts posts of Content-type
    multipart/form-data, this interface digests the XML that is posted
    and returns a xml response.
    I'm trying to get my flex client to comunicate with it using
    the following code:

    categoryRequest.url = "
    http://localhost:8080/sdmxRegistry3/restInterface";
    categoryRequest.method = "post";
    categoryRequest.addEventListener("fault",httpFault);

    categoryRequest.addEventListener("result",httpCategoryResult);
    categoryRequest.request = xmlQuery.toString;
    categoryRequest.send();
    .
    .
    .
    mx:HTTPService id="categoryRequest" resultFormat="e4x"
    useProxy="false" /mx:HTTPService

    The problem is returns the follwoing error.

    Error: [IOErrorEvent type="ioError" bubbles=false
    cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL:

    http://localhost:8080/sdmxRegistry3/restInterface"
    URL:
    http://localhost:8080/sdmxRegistry3/restInterface

    I'm new to Flex so I'm still feeling my way, but if I can
    overcome this problem it would be really help me out.

    Hope someone can help..

    D

    DB:2.56:Posting Xml To Rest Interface ks

    Yes, setting contentType can cause some problems. I leave it
    the default, which is the normal multipart/form-data, and POST xml
    strings as the value side of a name=value pair.

    But if you have it working and are comfortable, then that is
    fine.

    Tracy

  • RELEVANCY SCORE 2.55

    DB:2.55:Dmbasic: Error -2146823011 pp


    Hi Guys,I have setup two content server lets called csA and csB. I am running same dmbasic method on csA and csB but when this code is executed at csA and it runs fine and when it runs on csB it returns this errordmbasic: Error -2146823011 in line 426: Word could not create the work file. Check the temp environment variable.
    I can not evaluate why it is happening. here is extract of code from the method'************STAR Code for replace SOP effetive date, author, and approvers************
    '************Added by SSami 17-Jan-2007 to modify SOP by aplication and doc object*****
    Print #2,"START MODIFY SOP FILE"
    On Error GoTo ErrHandler
    ' Open word and replace text

    Print #2,"Application Object creating"
    Set objWord = CreateObject("Word.Application")
    Print #2,"Application Object created"

    objWord.Visible = False

    Print #2,"Document Object creating"
    Set objDoc = objWord.Documents.Open (tempFileName)
    Print #2,"Document Object created"

    Print #2,"Looking and replacing for text"
    objWord.Selection.Find.ClearFormatting
    objWord.Selection.Find.Replacement.ClearFormatting
    if (effdate="nulldate") then
    objWord.Selection.Find.Execute "##sop_effective##", False, False, False, False, False, True, 1, False, "##sop_effective##", 2 ' 'Replace:=wdReplaceAll
    else
    objWord.Selection.Find.Execute "##sop_effective##", False, False, False, False, False, True, 1, False, effdate, 2 ' 'Replace:=wdReplaceAll
    End if
    if (author="") then
    objWord.Selection.Find.Execute "##SOP Author##", False, False, False, False, False, True, 1, False, "##SOP Author##", 2 '
    else
    objWord.Selection.Find.Execute "##SOP Author##", False, False, False, False, False, True, 1, False, author "(e-signature retained in Documentum)", 2
    end if
    if (qa_approver="") then
    'Replaced # tag ##SOP QA Approver## with ##QA Approver## dated 23-Apr-2008 modified by SSami
    objWord.Selection.Find.Execute "##QA Approver##", False, False, False, False, False, True, 1, False, "##QA Approver##", 2
    else
    objWord.Selection.Find.Execute "##QA Approver##", False, False, False, False, False, True, 1, False, qa_approver "(e-signature retained in Documentum)", 2
    End if
    if (approver="") then
    objWord.Selection.Find.Execute "##SOP Approver##", False, False, False, False, False, True, 1, False, "##SOP Approver##", 2
    else
    objWord.Selection.Find.Execute "##SOP Approver##", False, False, False, False, False, True, 1, False, approver "(e-signature retained in Documentum)", 2
    End if
    Print #2,"Saving doc"
    objDoc.Save
    Print #2,"Saved doc"

    objDoc.Close
    Set objDoc = Nothing
    Print #2,"Quiting Application"
    objWord.Quit
    Print #2,"quit Application"
    Set objWord = Nothing
    Print #2,"End MODIFY WORD FILE"
    ErrHandler:
    If Not objDoc Is Nothing Then objDoc.Close False
    If Not objWord Is Nothing Then objWord.Quit False
    '************END Code for replace SOP effetive date, author, and approvers************

    '************START:Restore the file into repository***********************************
    status=dmAPIExec("setfile," sess "," componentID "," tempFileName)
    print #2, "After Setfile"
    status= dmAPIExec("save," sess "," componentID)
    print #2,"After Save File"

    if (status) then
    else
    err_msg$=dmAPIGet("getmessage," sess)
    print #2,"ERROR: setting SOP File:- " err_msg$
    end if
    '************END:Restore the file into repository*****************************************************************

    ' Step 3 : Convet SOP into PDF format***********************************************************************
    '************STAR Code to convert SOP to PDF format **************************************************************
    '************Added by SSami 28-Jan-2007***************************************************************************
    strQueueId=dmAPIGet("queue," sess "," componentID ", 'dm_autorender_win31','rendition',5,F,,'rendition_req_ps_pdf'")
    If (strQueueId=NULL) then
    Print #2,"DEBUG - Error queuing the itme in dmi_queue_item for converting into PDF"
    else
    Print #2, componentID " has been converted into PDF"
    end if
    '************END:Code to convert SOP to PDF format and send email to SOP author***********************************

    ' Step 4 : Send email to SOP Author. A custom event (dm_emailSOPAuthor) must be created at dm_event_sender8
    '************STAR Code to Send email to SOP Author****************************************************************
    '************Added by SSami 28-Jan-2007***************************************************************************
    strMessage="has been approved and transferred to the Pending location in Documentum "
    Print #2, strMessage
    strEmailQueueID=dmAPIGet("queue," sess "," ComponentID "," author ",dm_emailSOPAuthor,0,T,," strMessage)
    If (strEmailQueueID=NULL) then
    Print #2,"DEBUG - Error queuing the itme in dmi_queue_item for sending email"
    else
    Print #2, "Email has been sent to " author
    end if
    '************END Code to Send email to SOP Author****************************************************************

    'Deleting file from local machine
    Kill tempFileName
    print #2,"SOP File has been deleted from " tempFileName

    ' Step 2.1 : Create query to identify already existing object of sop_distribution list by comparing sop_number and r_version_label
    ' START 2.1**************************************************************************************************************************
    queryString = "DELETE sop_distribution_list OBJECTS WHERE ANY r_version_label='" strVersionLabel "' AND sop_number = '" strSopNumber "'"
    query_id=dmAPIGet("query," sess "," querystring)
    if (query_id=NULL) then
    Print #2,"ERROR: Wrong query"
    Print #2,dmAPIGet("getmessage,c")
    end if
    Print #2,"DEBUGG: DELET QUERY " queryString
    Print #2,"DEBUGG: DELET QUERY ID" query_id
    i=0
    while (dmAPIExec("next," sess "," query_id) 0)
    i=i+1
    wend
    Print #2,"DEBUG: DISTRIBUTION OBJECT DELETED:" i
    err_flag = dmAPIExec("close," sess "," query_id )
    ' END 2.1****************************************************************************************************************************

    ' Step 3.1 : Create new object type of sop_distribution_list and set attribute sop_number, r_version_label, and sop_effective_date.
    ' Set object_name as SOP/AAA/nnn Master Distribution List
    ' START 3.1**************************************************************************************************************************
    strDistributionObjname=strObjName " Master Distribution List"
    'Modify code by SSami dated 22-Apr-2008 to redfine the logic to retrieve object id of master distribution list
    strObjId= dmAPIGet("retrieve,c,sop_distribution_list where sop_number='ZZZ999'")
    strObjId= dmAPIGet("saveasnew,c," strObjId)
    'strObjId= dmAPIGet("saveasnew,c,09012499800a7d7e")
    Print #2,"DEBUGG: SOP DISTRIBUTION LIST DOC ID" strObjId
    status = dmAPISet("set," sess "," strObjId ",object_name", strDistributionObjname)
    Print #2,"DEBUGG: AFTER SET OBJECT NAME:" strDistributionObjname
    status = dmAPISet("set," sess "," strObjId ",sop_number", strSopNumber)
    Print #2,"DEBUGG: AFTER SET SOP NUMBER:" strSopNumber
    status = dmAPISet("set," sess "," strObjId ",r_version_label", strVersionLabel)
    Print #2,"DEBUGG: AFTER SET VERSION NUMBER:" strVersionLabel
    status = dmAPISet("set," sess "," strObjId ",sop_status", "")
    Print #2,"DEBUGG: AFTER SET SOP STATUS EMPTY"
    status = dmAPISet("set," sess "," strObjId ",sop_effective_date", strSopEffectiveDate)
    Print #2,"DEBUGG: AFTER SET EFFECTIVE:" strSopEffectiveDate
    status= dmAPIExec("save," sess "," strObjId)
    Print #2,"After save"
    ' END 3.1***************************************************************************************************************************

    ' Step 4.1 : Replace text sop_number,r_version_label, and sop_effective_date
    ' START 4.1********************************************************************
    'Return number of values in sop_distribution
    intDistributionList = dmAPIGet("values," sess "," componentID ",sop_distribution")
    Print #2,"DEBUGG: DIstributions Values: " intDistributionList
    tempFileName = dmAPIGet("getfile," sess "," strObjId)
    Print #2, "File path: " tempFileName
    Print #2,""
    Print #2,"DEBUGG: START MODIFY DISTRIBUTION LIST FILE"
    On Error GoTo ErrHandler1
    ' Open word and replace text
    Print #2,"Application Object creating"
    Set objWord = CreateObject("Word.Application")
    Print #2,"Application Object created"

    objWord.Visible = False

    Print #2,"Document Object creating"
    This is the line 426Set objDoc = objWord.Documents.Open (tempFileName)
    Print #2,"Document Object created"
    'Added by SSami 23 JUL 2008
    ' 1 = wdNormalView
    ' 2 = wdOutlineView
    ' 3 = wdPrintView
    If objWord.ActiveWindow.ActivePane.View.Type = 1 _
    Or objWord.ActiveWindow.ActivePane.View.Type = 2 Then
    objWord.ActiveWindow.ActivePane.View.Type = 3
    End If
    objWord.ActiveWindow.ActivePane.View.SeekView = 9 'wdSeekCurrentPageHeader
    If objWord.Selection.HeaderFooter.IsHeader = True Then
    objWord.ActiveWindow.ActivePane.View.SeekView = 9 'wdSeekCurrentPageFooter
    Else
    objWord.ActiveWindow.ActivePane.View.SeekView = 9 'wdSeekCurrentPageHeader
    End If
    Print #2,"Looking and replacing for text"
    objWord.Selection.Find.ClearFormatting
    objWord.Selection.Find.Replacement.ClearFormatting
    objWord.Selection.Find.Execute "##sop_effective_date##", False, False, False, False, False, True, 1, False, effdate, 2 ' 'Replace:=wdReplaceAll
    objWord.Selection.Find.Execute "##sop_number##", False, False, False, False, False, True, 1, False, strSopNumber , 2 ' 'Replace:=wdReplaceAll
    objWord.Selection.Find.Execute "##r_version_label##", False, False, False, False, False, True, 1, False, strVersionLabel, 2 ' 'Replace:=wdReplaceAll
    Print #2,"Finished looking and replacing for text"
    'Added by SSami 23 JUL 2008
    objWord.ActiveWindow.ActivePane.View.SeekView = 0 'wdSeekMainDocument
    Print #2,"Inserting Rows"
    objWord.Selection.Find.ClearFormatting
    objWord.Selection.Find.Execute "N/R", False, False, False, False, False, True, 1, False
    For i=0 to intDistributionList-1
    strDistriburion=dmAPIGet("get," sess "," componentID ",sop_distribution[" i "]")
    objWord.Selection.InsertRowsBelow 1
    objWord.Selection.MoveLeft Unit:=1, Count:=1
    objWord.Selection.MoveRight Unit:=12
    objWord.Selection.MoveRight Unit:=12
    objWord.Selection.TypeText Text:=strDistriburion
    objWord.Selection.MoveRight Unit:=12
    objWord.Selection.MoveRight Unit:=12
    objWord.Selection.MoveRight Unit:=12
    objWord.Selection.MoveRight Unit:=12
    objWord.Selection.MoveRight Unit:=12
    'Modified by SSami 21-May-2008 avoiding to fill QA coloumn
    'objWord.Selection.TypeText Text:=strDistriburion
    objWord.Selection.TypeText Text:=""
    Next i
    Print #2,"Rows inserted"
    Print #2,"Saving doc"
    objDoc.Save
    Print #2,"Saved doc"

    objDoc.Close

    Set objDoc = Nothing
    Print #2,"Quiting Application"
    objWord.Quit
    Print #2,"quit Application"
    Set objWord = Nothing
    Print #2,"DEBUGG: End MODIFY DISTRIBUTION LIST FILE"
    ErrHandler1:
    Print #2,"ERROR1: Opening word file"
    If Not objDoc Is Nothing Then objDoc.Close False
    If Not objWord Is Nothing Then objWord.Quit False
    '************END Code for Text************

    Thanks for you help Saqib Sami

    DB:2.55:Dmbasic: Error -2146823011 pp

    After re-installation of MS Office 2003 the problem has been resolved.

  • RELEVANCY SCORE 2.54

    DB:2.54:Error 0xbff6210d When Configuring Std0 ac



    I use the frame API and have some code that runs fine with the PCI low speed card, however with USB-8472 the same code returns error 0xBFF6210D when I try to configure theSTD0 object (to set the slaves in operational mode).

    I can read the channel and see the heartbeats from the slaves fine, but for some reason the USB-8472 claims I am trying to use an unsupported feature when I open STD0 (not much use for the box if it does not support that!). I use the following inputs to the nCConfigCANobj.vi:

    Period:0
    Read Que Length: 0
    Write Que Length: 1
    Receive Changes Only: False
    Communication Type: Transmit Data By Call
    Transmit by Response: False
    Data Length: 2




    MTO

    DB:2.54:Error 0xbff6210d When Configuring Std0 ac

    Hi,

    Yes thats correct the CANopen Library uses objects for some periodic tasks and the 847x USB CAN does not support object communication. Thus no CANopen Library support for the USB CAN dvices. Sorry.

    Seethe KB for these and other USB CAN limits: ni-can function call support for 847x devices

    DirkW

  • RELEVANCY SCORE 2.54

    DB:2.54:Argument Exception On String Paths 3s


    Just getting started with PEX, and I've got one I don't understand:
    Here's the code:

    /// summary
    /// Copy the backup file back over the original file
    /// /summary
    /// param name=pathThe path to the original file/param
    /// returnstrue if able to restore, false if restore failed/returns
    public bool RestoreBackup(string path)
    {
    // pex
    Contract.Requires(path == (string)null);
    // /pex
    Contract.RequiresArgumentNullException(path != null);
    Contract.RequiresArgumentException(string.IsNullOrEmpty(path));

    if (string.IsNullOrEmpty(path))
    throw new ArgumentNullException(path);

    var backupFile = string.Format({0}_bak{1}, Path.GetFileNameWithoutExtension(path),
    Path.GetExtension(path));

    var dirName = Path.GetDirectoryName(path);

    if (string.IsNullOrEmpty(dirName))
    return false;

    var newPath = Path.Combine(dirName, backupFile);

    if (!FileExists(newPath))
    return false;

    try
    {
    File.Copy(newPath, path, true);
    }
    catch (Exception ex)
    {
    Log.ErrorFormat(Error restoring backup file for {0} : {1}, path, ex);
    return false;
    }
    return true;
    }

    DB:2.54:Argument Exception On String Paths 3s

    Make sure the Contracts are enabled (Project - Properties - Code Contracts - Runtime checking) otherwise the contracts are a no-op.
    Otherwise, what also happens is that Pex explores the implementation of Path.GetFileNameWithoutExtension(path) and tries to generate invalid paths as well.Jonathan Peli de Halleux - Try Pex online at
    www.pexforfun.com!

  • RELEVANCY SCORE 2.54

    DB:2.54:Issue With Applet Icommand (Mii 12.2.3 ) mf



    Hi Friends,

    i'm using below code which executes the query template and its written inside .irpt page .

    APPLET NAME="ByProd_Applet" CODEBASE="/XMII/Classes" CODE="iCommand" ARCHIVE="illum8.zip" WIDTH="1" HEIGHT="1" MAYSCRIPT

    PARAM NAME="QueryTemplate" VALUE="HEM-MES/PhaseConfirm/Xacute_Complete_Save_Button"

    /APPLET

    while executing the QT seperately it works fine and returns the success message( eg : in my case " Phase confirmation successful " ). When QT is embedded with applet it returns false value . Inside the .irpt page calling complete.js file .while executing the applet

    complet.js code :

    if ( document.ByProd_Applet.executeCommand())

    {

    // Actual process which i want to be executed

    }

    else

    {

    alert(document.ByProd_Applet.getLastError());

    }

    document.ByProd_Applet.executeCommand() returns false value. it should be true since BLT QT returns success message. Else part causes Pop Up " Last Error messge : , Message : Successfully displayed " which i dont want.

    Why executeCommand getting failed though QT returns success message. Do i need to do anything with applet MII12.2.3 ??

    kindly do the needul .

    Regards,

    Annamalai.

    DB:2.54:Issue With Applet Icommand (Mii 12.2.3 ) mf


    Does your Xacute QT return a FatalError message (using the Terminate action block is an easy test)? If you are returning an XML document using the FatalError action block, then I assume that should work too.

  • RELEVANCY SCORE 2.54

    DB:2.54:Checking The Status Of Threads Migrating To Device.Exe On Ce5.0 7d


    I have written a driver which keeps track of user process threads migrating to device manager (device.exe). In the driver, I want to keep track of the status of the threads, specifically if the thread has exited. Here are few things I have tried without much success: 1. While thread is in device.exe, save thread id using the GetCurrentThreadId() and periodically check the status of the thread by using GetExitCodeThread(). GetExitCodeThread() returns failure with error code INVALID_HANDLE. 2. Trued DuplicateHandle() to be able to get local handle to the thread in device.exe for invoking GetExitCodeThread().          DuplicateHandle(GetOwnerProcess(), GetCurrentThread(), GetCurrentProcess(), FALSE, 0, .._SAME_PERMISSION)     This call always returns failure with error code of INVALID parameter. Based on the some documentation I could find, it     seems that DuplicateHandle() is not supported in WinCE5.0 for thread handles. Can someone suggest a good way to achieve this.

    DB:2.54:Checking The Status Of Threads Migrating To Device.Exe On Ce5.0 7d

    I have written a driver which keeps track of user process threads migrating to device manager (device.exe). In the driver, I want to keep track of the status of the threads, specifically if the thread has exited. Here are few things I have tried without much success: 1. While thread is in device.exe, save thread id using the GetCurrentThreadId() and periodically check the status of the thread by using GetExitCodeThread(). GetExitCodeThread() returns failure with error code INVALID_HANDLE. 2. Trued DuplicateHandle() to be able to get local handle to the thread in device.exe for invoking GetExitCodeThread().          DuplicateHandle(GetOwnerProcess(), GetCurrentThread(), GetCurrentProcess(), FALSE, 0, .._SAME_PERMISSION)     This call always returns failure with error code of INVALID parameter. Based on the some documentation I could find, it     seems that DuplicateHandle() is not supported in WinCE5.0 for thread handles. Can someone suggest a good way to achieve this.

  • RELEVANCY SCORE 2.53

    DB:2.53:Wtsqueryusertoken Error sx


    I need to calla process and run as userfrom service,soI need to get a user token on a session by calling WTSQueryUserToken() in a service,but I found
    it failed when i logon witha LIVE ID in Win8, error code is 1008.This results i can't call my process successfully.Any idea or solution? Thanks a lot!

    DB:2.53:Wtsqueryusertoken Error sx

    This is a Kinect for Windows SDK forum. There is no WTSQueryUserToken available in this SDK.
    will try to move your thread to a more appropriate spot.Carmine Sirignano - MSFT

  • RELEVANCY SCORE 2.52

    DB:2.52:Wtsqueryusertoken() Failed On A Remote Desktop Session jj


    I need to get a user token on a session by calling WTSQueryUserToken(),but I found it failed on a remote desktop session, error code is 1008.This results in my application cannot run properly if it is launched onremote desktop. Any idea or solution? Thanks a lot!
     

    DB:2.52:Wtsqueryusertoken() Failed On A Remote Desktop Session jj

     
    hi Joson Zhou
     
    Thanks for quick reply, will post my query to mentioned forum.
     
    -Rajender saini

  • RELEVANCY SCORE 2.52

    DB:2.52:Tabular Form Internal Error x7


    Why Tabular form submit returns with internal error html code ?

    DB:2.52:Tabular Form Internal Error x7

    You should post Apexlistener queries here {forum:id=858}

    And what exactly is the relation in your post title "Tabular form internal error" and the java error?

    Regards,

    Edited by: Prabodh on Jun 20, 2012 4:15 PM

  • RELEVANCY SCORE 2.51

    DB:2.51:How To Open Popup Window In Mac 7p



    I'm using code below to create popup Windows. If Windows with IE and FireFoX it works OK.
    In Mac it returns Cannot open popup window
    (I tried with FireFox and Safari).
    How to fix this code so it works in Mac also ?
    Andrus
    HtmlPopupWindowOptions options =
    new
    HtmlPopupWindowOptions()
    {
    Left = 0,
    Top = 0,
    Menubar = false,
    Scrollbars = true,
    Toolbar = false,
    Directories = false,
    Resizeable = true,
    Status = false,
    Location= false
    };
    var myWindow =
    HtmlPage.PopupWindow(sourceUri,
    null, options);
    if (myWindow ==
    null)
    MessageBox.Show(Cannot open popup window);
    else {
    myWindow.Eval(resizeTo(screen.width,screen.height-20));
    myWindow.SetProperty(title, Title );
    }

    DB:2.51:How To Open Popup Window In Mac 7p

    See theBrowser Considerations in http://msdn.microsoft.com/en-us/library/system.windows.browser.htmlpage.popupwindow(VS.95).aspx
    It says: In Safari, pop-up windows are not available.
    You may trycalling javascript(window.open) in silverlight.

  • RELEVANCY SCORE 2.51

    DB:2.51:Re: File.Setlastmodified() Returns False!!!!! 99


    can you post the relevant code that calls the method?

    DB:2.51:Re: File.Setlastmodified() Returns False!!!!! 99

    killesk wrote:
    So basically, you can't edit a file in unix , even through it's read/write/delete permissions have been set, unless you own the dam file... Wrong.

  • RELEVANCY SCORE 2.49

    DB:2.49:Createprocess Fails With Error_File_Not_Found On Jpn p1


    Hi,

    The following code fails on Windows 2008 JPN and returns ERROR_FILE_NOT_FOUND while works perfectly on english Windows -

    CString strCommand = dir;
    bool bInheritHandles=false;

    if (!CreateProcess(NULL, (_TCHAR*)(LPCTSTR)strCommand, NULL, NULL, bInheritHandles, 0, NULL, NULL, startUpInfo, procInfo))
    {
    DWORD error = GetLastError();
    couterror;
    }

    DB:2.49:Createprocess Fails With Error_File_Not_Found On Jpn p1

    Hi SoftEngi,
    Even you can use dir on English OS, please treat it as a bonus but do not rely on it. The safe wayto callCreateProcess is always a full path of the executable file. If you really want to support dir, please handle it in code and append cmd.exe
    path manually.Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Regards,
    Jacky Wu
    Microsoft Online Community Support

  • RELEVANCY SCORE 2.49

    DB:2.49:Credread() Method Always Returns False With Error_No_Such_Logon_Session Error pk


    I have a custom BCS connector deployed as a content source in SharePoint 2013. During crawl, in this connector code, I am trying to access the credentials stored in Windows Credential Manager. I am using the default Credential Management API. But CredRead
    always returns false with ERROR_NO_SUCH_LOGON_SESSION error.

    I have changed the Search Service Administration windows service to run under the admin credentials- say 'Admin' (currently logged on user under who's logon session the credentials are stored). The default content access account is also configured to use the
    same Admin credentials. The filter deamon process mssdmn.exe thus, runs under the same Admin credentials. WindowsIdentity.Current().User returns the Admin user, with all the required permissions. Also, Appdomain.Current.IsFullyTrusted returns true. However,
    call to CredRead() for any target fails with 1312 error.

    Even impersonation and elevated privileges do not work.

    The same code works in a console application or a windows service deployed and running under the Admin account. Not sure what is going wrong here. Is there some problem with user credentials or with the logon sessionwhen the process is launched from a
    SSA service?

    Thanks,
    Nandini

    DB:2.49:Credread() Method Always Returns False With Error_No_Such_Logon_Session Error pk

    I have a custom BCS connector deployed as a content source in SharePoint 2013. During crawl, in this connector code, I am trying to access the credentials stored in Windows Credential Manager. I am using the default Credential Management API. But CredRead
    always returns false with ERROR_NO_SUCH_LOGON_SESSION error.

    I have changed the Search Service Administration windows service to run under the admin credentials- say 'Admin' (currently logged on user under who's logon session the credentials are stored). The default content access account is also configured to use the
    same Admin credentials. The filter deamon process mssdmn.exe thus, runs under the same Admin credentials. WindowsIdentity.Current().User returns the Admin user, with all the required permissions. Also, Appdomain.Current.IsFullyTrusted returns true. However,
    call to CredRead() for any target fails with 1312 error.

    Even impersonation and elevated privileges do not work.

    The same code works in a console application or a windows service deployed and running under the Admin account. Not sure what is going wrong here. Is there some problem with user credentials or with the logon sessionwhen the process is launched from a
    SSA service?

    Thanks,
    Nandini

  • RELEVANCY SCORE 2.49

    DB:2.49:Access Is Denied In Wtsqueryusertoken And Windows 2003 Ent Sp1 79


    Hello,I have a service that needs to get the current user's token.
    I do this by using the HandlerEx along with the WTS notifications that occur during any Logon/Logoff/Lock/etc.. to get the SessionId and call
    WTSQueryUserToken with that SessionId. This code works fine on the XP
    Sp1 and Sp2 operating systems, but for some reason, whenever I call it
    with Windows 2003 enterprise SP1, the code fails to run, returning an
    error of Access Is Denied.I looked it up and saw that Access Is
    Denied means that I either don't have the Local System user or the
    SE_TCB_NAME privilege enabled. I have both of them enabled, and it
    still doesn't work.I'm really lost, can anyone please help?Thanks

    DB:2.49:Access Is Denied In Wtsqueryusertoken And Windows 2003 Ent Sp1 79

    Not a C++ question. It is by design. You no longer share the session 0 with the console user. search session 0 isolation for details. If you still have question, ask in a Windows security programming forum/newsgroup.

  • RELEVANCY SCORE 2.49

    DB:2.49:Createprocessasuser From Service In Xp Sometimes Launches App Under System 83


    We have a service which launches an application.
    If there is an active user, the app must run under user account; if not, under SYSTEM. So, if user logs off, the service starts new instance running as SYSTEM; when user logs on, it starts using CreateProcessAsUserW for current user.
    Everything works fine, but sometimes newly launched application in XP is running under SYSTEM account (as seen from Task Manager or Process Explorer). Nevertheless, our log shows that service really attempts to launch the application under user account,
    and user name in the application itself (obtained via GetUserName() method) returns correct user name.
    The way the application is launched is:
    HANDLE hProcess = NULL,hToken = NULL;
    if ( WTSQueryUserToken(dwSessionId, hToken) == 0 ) // for XP, dwSessionId always turns out 0

    ...
    HANDLE hTokenDup = NULL;
    if ( DuplicateTokenEx(hToken, MAXIMUM_ALLOWED, NULL, SecurityIdentification,TokenPrimary, hTokenDup) == 0 )
    ...

    LPVOID lpEnvironment = NULL;
    if ( CreateEnvironmentBlock(lpEnvironment, hTokenDup, FALSE /* do not inherit */) == 0 )
    ...
    WCHAR szCmdLine[MAX_PATH];
    STARTUPINFOW startup_info;
    // Ommitedcommand line and startup_info initialization
    PROCESS_INFORMATION proc_info;

    BOOL ok = CreateProcessAsUserW(
    hTokenDup,
    NULL,
    szCmdLine,
    NULL,
    NULL,
    FALSE,
    CREATE_UNICODE_ENVIRONMENT,
    lpEnvironment,
    NULL,
    startup_info,
    proc_info);
    Any idea what's happening?

    DB:2.49:Createprocessasuser From Service In Xp Sometimes Launches App Under System 83

    Microsoft admitted that there is a problem in XP.
    Here is what I found after some research:
    For processes launched for logged user from a service, when process token is being used to obtain user credentials, it returns a user. But when SID is being used, it sometimes
    returns SYSTEM.
    Apparently, Process Explorer and Task Manager use SID to obtain user credentials, which causes confusion. But process itself behaves as having user credentials, which tells me
    that internally Windows uses process token. I.e. the problem is basically cosmetic, altough quite uncomfortable.

  • RELEVANCY SCORE 2.48

    DB:2.48:Createmeeting Fails With Servererror ap



    Hello.

    I have some strange error with creating Webex meeting by XML API  with notification users.

    I've added 

    attendeeOptions
    emailInvitationstrue/emailInvitations
    /attendeeOptions

    and 

    emailInvitationstrue/emailInvitations

    ​to every attendee.

    But server returns Server error. If I change attendee emailInvitations to false server returns Success result. 

    Also I've tried with CreateMeetingAttendee with emailInvitations=false server returns Success, if I change to true server returns 404 error.

    Api version: 5.7

     

    DB:2.48:Createmeeting Fails With Servererror ap


    Error response:

    serv:message xmlns:serv="http://www.webex.com/schemas/2002/06/service" xmlns:com="http://www.webex.com/schemas/2002/06/common" xmlns:meet="http://www.webex.com/schemas/2002/06/service/meeting" xmlns:att="http://www.webex.com/schemas/2002/06/service/attendee"serv:headerserv:responseserv:resultFAILURE/serv:resultserv:reasonServer Error/serv:reasonserv:gsbStatusPRIMARY/serv:gsbStatusserv:exceptionID000000/serv:exceptionID/serv:response/serv:headerserv:bodyserv:bodyContent//serv:body/serv:message

     

    Problem is very serious because it is not possible to send invitations to attendees.

  • RELEVANCY SCORE 2.47

    DB:2.47:Beforereporttrigger Returns False df


    Hi,

    I have this data template with a beforereport and afterreport trigger. In the beforereport trigger, there is a possibility that it will and should return false. The problem is I do not know where to handle that kind of error so I could return a more presentable error message.

    Please help.

    Thanks!

    DB:2.47:Beforereporttrigger Returns False df

    Hi,

    I have this data template with a beforereport and afterreport trigger. In the beforereport trigger, there is a possibility that it will and should return false. The problem is I do not know where to handle that kind of error so I could return a more presentable error message.

    Please help.

    Thanks!

  • RELEVANCY SCORE 2.47

    DB:2.47:Problem With My Service In Windows Xp 98


    Hi,
     
    I have a little problem and I would like to ask on this:
     
    I want to run new process form a service with CreateProcessAsUser (I check, if there is somebody log on). That's work fine in Windows Vista and 7 (I get UAC warning, that some aplication wants to start) but problem is in Windows XP. The metod CreateProcessAsUser failed, but GetLastError returns 0. Also it doesnt work, when a try to start aplication from another aplication in Windows XP.
     
    Method for do all this looks like this:
     
    1) WTSGetActiveConsoleSessionId()
     
    2) WTSQueryUserToken()
     
    3) DuplicateTokenEx()
     
    4) CreateEnvironmentBlock()
     
    5)
     
    if ( !CreateProcessAsUser(
      hTokenDup,
      prevedeno,
      operace,
      NULL,
      NULL,
      FALSE,
      dwCreationFlag,
      pEnv,
      NULL,
      si,
      pi
      ) )
     {
         error(LFailed: );
         CString str;
         str.Format(_T(%u),GetLastError());
         error(str);
      return false;
     }
     }
     return true;
    }
     
     
    When I set error with SetLastError(8) i really get 8 from error(str).
     
    Does anybody knows, where is the problem?
     
    Thanks for any help with this.

  • RELEVANCY SCORE 2.47

    DB:2.47:Problem Accessing Hkcu And Using Getuserdefaultuilanguage When The Calling Process Is A System Owned Process 71


     
    Good Day! guyz,
     
    I need your idea of my problem, maybe u have any suggestions..
    here my problem.
     
    1. My application was already a system owned process due to an system impersonated token, my application calls
    GetUserDefaultUILanguage and the return value is always English(0x409) but the loaded Vista MUI is Japanese. But, If my application is launch with a user token the return value is for Japanese(0x411)
    which is correct. I also implement an impersonateloggedonuser to fix the issue but application verifier will not accept it.
    here's my snippets, without an application verifier the code below is working....
    ......my application which is already a system owned process
     
    dwSessionId = WTSGetActiveConsoleSessionId();WTSQueryUserToken(dwSessionId, hUserToken);//Impersonate the logged on user. ImpersonateLoggedOnUser(hUserToken);langID = GetUserDefaultUILanguage(); RevertToSelf(); CloseHandle(hUserToken);
    ....
    the highlighted one is the error part where the application verifier pointed to.
     
    Do you have any solution for that?
     
    2.  Second problem is that the same application as no. 1 as system owned process and it is accessing the the HKCU
     but I cannot retrieved any data. here's the snippet below that is working without application verifier...
     
    dwSessionId = WTSGetActiveConsoleSessionId();WTSQueryUserToken(dwSessionId, hUserToken);//Impersonate the logged on user. ImpersonateLoggedOnUser(hUserToken);RegistryOpenAndRead(Hkcu);
    RevertToSelf(); CloseHandle(hUserToken);
     
    Is there another way of accessing a Registry or Current User data when the calling process is system owned one?
     
     

    DB:2.47:Problem Accessing Hkcu And Using Getuserdefaultuilanguage When The Calling Process Is A System Owned Process 71

    seems like no one is answering...anyways..I got one solution already...but not good as i thinkMay be you can have the best solution...please provide one...

  • RELEVANCY SCORE 2.46

    DB:2.46:Openprocess() Returns Access Is Denied. mp


    I amusingWIndows 2008 with maximum UAC enabled(Always Notify me...). I am starting Porcess A with Standard user token. Then trying to open Process B (Started with admin token) using process id. I just need the process handle.I have the following
    code to open process B. It fails and returns ACCESS_DENIED during this operation.
    HANDLE hProcess=OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_VM_READ,FALSE,pid);

    I tried to adjust tokenprivilegeusing following code. But AdjustTokenPrivileges() returns True But gives errorERROR_NOT_ALL_ASSIGNED. Also i cannot open Process B.
    // Setting process access rights
    HANDLE hToken = NULL;
    TOKEN_PRIVILEGES tokenPriv;
    LUID luidDebug;
    if( FALSE != OpenProcessToken( GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES|TOKEN_READ, hToken ))
    {
    if( FALSE != LookupPrivilegeValue( NULL, SE_DEBUG_NAME, luidDebug ))
    {
    tokenPriv.PrivilegeCount = 1;
    tokenPriv.Privileges[0].Luid = luidDebug;
    tokenPriv.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
    if( FALSE != AdjustTokenPrivileges( hToken, FALSE, tokenPriv, 0, NULL, NULL))
    {

    }
    }
    }
    Could anyone help me in this?I want it to work regardless Process A and Process B UAC level.

    Thanks, Renjith V R

    DB:2.46:Openprocess() Returns Access Is Denied. mp

    There is another way. UsePROCESS_QUERY_LIMITED_INFORMATION for OpenProcess().Thanks, Renjith V R

  • RELEVANCY SCORE 2.46

    DB:2.46:Correct Way Of Displaying Result From A Complex Type Result Of Webservice a8


    Hi,

    Im trying to call a webservice with the following code
    and expect to dump a list of country but when I try to dump it I am
    getting the following methods.

    cfscript
    ws = createObject("webservice", "
    http://sandbox.voxbone.com/ws/services/VoxService?wsdl");
    myReturnVar = ws.getCountriesList(args);
    /cfscript

    cfoutput# myReturnVar.ctry#/cfoutput
    cfdump var="# myReturnVar#"

    1st DUMP:
    voxbone.webservices.services.containers.ArrayOfCountry@94185581

    object of
    voxbone.webservices.services.containers.ArrayOfCountry
    Methods hashCode (returns int)
    equals (returns boolean)
    getCountry (returns
    [Lvoxbone.webservices.services.containers.Country;)
    getCountry (returns
    voxbone.webservices.services.containers.Country)
    getSerializer (returns interface
    org.apache.axis.encoding.Serializer)
    getDeserializer (returns interface
    org.apache.axis.encoding.Deserializer)
    getTypeDesc (returns org.apache.axis.description.TypeDesc)
    setCountry (returns void)
    setCountry (returns void)
    getClass (returns java.lang.Class)
    wait (returns void)
    notify (returns void)
    notifyAll (returns void)
    toString (returns java.lang.String)

    On my 1st DUMP, I can see two (2) getCountry() methods and
    tried the following code and do a 2nd DUMP if I can display the
    data I want but when I tried to dump it I am getting another
    hierarchy of methods ( please see below 2nd DUMP). Now the error
    comes when I try to dump getCountryName() method to display country
    name for example but it gives me function not found. Can someone
    help me what is the correct way of displaying data from a web
    service result? Thank you and really appreciate any input.

    cfscript
    ws = createObject("webservice", "
    http://sandbox.voxbone.com/ws/services/VoxService?wsdl");
    myReturnVar = ws.getCountriesList(args);

    realStruct = structNew();
    realStruct.ctry = myReturnVar.getCountry();
    /cfscript

    cfoutput#realStruct.ctry#/cfoutput
    cfdump var="#realStruct.ctry#"

    2nd DUMP:

    Lvoxbone.webservices.services.containers.Country;@11e3923
    array
    1 object of voxbone.webservices.services.containers.Country
    Methods hashCode (returns int)
    equals (returns boolean)
    getSerializer (returns interface
    org.apache.axis.encoding.Serializer)
    getDeserializer (returns interface
    org.apache.axis.encoding.Deserializer)
    getTypeDesc (returns org.apache.axis.description.TypeDesc)
    getAvailableDidsCount (returns int)
    setAvailableDidsCount (returns void)
    getCountryCodeA2 (returns java.lang.String)
    setCountryCodeA2 (returns void)
    getCountryName (returns java.lang.String)
    setCountryName (returns void)
    getCountryPhoneCode (returns int)
    setCountryPhoneCode (returns void)
    getClass (returns java.lang.Class)
    wait (returns void)
    wait (returns void)
    wait (returns void)
    notify (returns void)
    notifyAll (returns void)
    toString (returns java.lang.String)

    DB:2.46:Correct Way Of Displaying Result From A Complex Type Result Of Webservice a8

    Actually, the suggested way to do it is for each get method,
    e.g. getCountry(), use dot notation.
    result.aCountries[1].country

    You can check with properties are accessable by dumping
    StructKeyArray(webServiceResult) which is much easier to decipher
    than the dump of a complex type.

    Finally, if using CF7, you can get the RAW xml that came from
    your SOAP request. You might find this easy to navigate after
    dumping it to examine its structure. This approach is more useful
    for Document Literal style services.

  • RELEVANCY SCORE 2.45

    DB:2.45:Cmo Obtener Token De Una Sesin Actual Con Wtsqueryusertoken dp


    Tengo una clase que obtiene las sesiones actuales y necesito saber el token de cada sesión, para ello utilizo la función WTSQueryUserToken pero me devuelve token = 0.
    El código es:
    DllImport(Wtsapi32.dll, EntryPoint:=WTSQueryUserToken, SetLastError:=True) _
    Public Function WTSQueryUserToken(ByVal SessionId As UInteger, ByRef phToken As IntPtr) As MarshalAs(UnmanagedType.Bool) Boolean
    End Function
    Y la llamada a la función es:
    WTSQueryUserToken(session, token) 'Session = 0(System) o 1 (usuario actual)
    Pasa por la línea, no da error pero no devuelve el valor del token. Token tiene valor 0.
    alguna idea? gracias.

    DB:2.45:Cmo Obtener Token De Una Sesin Actual Con Wtsqueryusertoken dp

    Buscando información he encontrado una posible causa, que sería el privilegio SE_TCB_NAME (necesario para que funcioneWTSQueryUserToken). Ya que me daba el error 1314
    Pero he consultado el valor de SE_TCB_NAME y su valor es true...así que no sé cuál puede ser el problema.
    He consultado su valor así:
    Public Const SE_TCB_NAME As String = SeTcbPrivilege
    Public Const SE_TCB_NAME_ENABLE As Integer = 1
    Public Const SE_TCB_NAME_DISABLED As Integer = 0
    Public Const TOKEN_ADJUST_PRIVILEGES As Integer = 32

    StructLayout(LayoutKind.Sequential, Pack:=4) _
    Public Structure TokenPrivileges
    Public PrivilegeCount As Integer
    Public Luid0 As Integer
    Public SETCBNAME As Integer
    End Structure

    DllImport(advapi32.dll, CharSet:=CharSet.Auto, SetLastError:=True) _
    Public Function LookupPrivilegeValue(ByVal systemName As String, ByVal privName As String, ByRef luid As Long) As Boolean
    End Function

    Dim ok As Boolean
    Dim priv As TokenPrivileges = New TokenPrivileges
    ok = LookupPrivilegeValue(Nothing, SE_TCB_NAME, priv.Luid0)

  • RELEVANCY SCORE 2.45

    DB:2.45:Having A Problem With Setupdigetdeviceinterfacedetail fk


    I hope this is the right forum, I am having a problem with SetupDiGetDeviceInterfaceDetail, every time I invoke it, it returns a false, GetLastError returns 5, which as I understand it is an Access Denied error. Is anyone familiar with this problem?

    Thanks, in advance.

    DB:2.45:Having A Problem With Setupdigetdeviceinterfacedetail fk

    I am also having problem withSetupDiGetDeviceInterfaceDetail. While second time calling of this function it is failing with GetLastError() equal to 1784. Can anyone help me out.

  • RELEVANCY SCORE 2.45

    DB:2.45:A Curious Case Of Instanceof Keyword Usage In Jdk 1.5 kz


    {color:#333399}Hello,

    As most of us know the instanceof keyword can be used to test if an object is of a specified object type. And the syntax for its common usage is as follows - if (objectReference instanceof type).

    Recently i came across a code piece on which the instanceof keyword returns an unexpected result. The piece of code is following.

    *class Cat { }*
    *class Dog {*
    *public static void main(String [] args) {*
    Dog d = new Dog();
    System.out.println(d instanceof Cat);
    *}*
    *}*

    The weird part about the code is instead of returning false, the instanceof keyword triggers a compile error with the following message -

    Dog.java:5: inconvertible types
    found : Dog
    required: Cat
    System.out.println(d instanceof Cat);
    *^*
    *1 error*

    Does anyone know -
    *1) why this error comes and*
    *2) why the instanceof keyword doesnt return a false value.*

    Any help is very much appreciated.
    Prince P V{color}

    DB:2.45:A Curious Case Of Instanceof Keyword Usage In Jdk 1.5 kz

    What's the problem? The compiler had enough information to ascertain that a Cat isn't, and can't ever be, a Dog. Incidentally, the instanceof keyword hasn't returned anything here: your compiler failed to compile. Important distinction, since returns happen at runtime

  • RELEVANCY SCORE 2.45

    DB:2.45:Validation.Gethaserror - Always Returns False ? jf


    I've updated the validation rule to fail every time but GetHasError returns false,I get same behavior with the code in the msdn
    documentation, and Validation.GetHassError always returns false, did I miss anything?

    You can find the sample in skydrive
    here

    Thanks

    Regards Vallarasu S. FSharpMe.blogspot.com

    DB:2.45:Validation.Gethaserror - Always Returns False ? jf

    hi,
    u have created the post as Discussion and not as Question
    so u won't find mark as answer link.
    if u wish u can change the type and mark as answer

    regards
    Jagan

  • RELEVANCY SCORE 2.45

    DB:2.45:Wtsqueryusertoken Failing ds



    Hello Everyone,I have written a service that runs under the system account. At some event i have to launch an executable under the current logged in user context from the service. I am using:WTSGetActiveConsoleSessionId to get the session id for the current logged in user and then calling WTSQueryUserToken to get the token of the user and then using CreateProcessAsUser to launch the exe under the user context.but i a facing some strange behaviors i.e. WTSQueryUserToken is failing on some machine while successful in returning the token on other machines. I have Windows XP with SP2 on all the machines. GetLastError gives me the following error description:The operation being requested was not performed because the user has not logged on to the network.The specified service does not exists.Can anyone please guide me where is the problem exists, as WTSQueryToken is successful on some machines and fails on other machines. Is there any sort of configurations problem or anything else. Please guide me to cater this issue.Following is the code that i am using to launch the application

    Code Snippet

    DB:2.45:Wtsqueryusertoken Failing ds

     hi,in the code which you have pasted you are not using GetActiveConsoleSessionId to get the active session id you have used EnumerateSessions. does this happen after a fresh restart or when the machine already up for quite some time and you try logon-logoffs ?

  • RELEVANCY SCORE 2.44

    DB:2.44:Return Value Of Getint On Callablestatement d7


    I am calling a stored procedure which returns an integer.
    One of the "VALID" values the stored procedure returns is 0.
    below is the snippet of code.......
    CallableStatement cst;
    cst = con.prepareCall("{?=call set_status(?,?,?,?)}");
    cst.registerOutParameter(1,Types.INTEGER);
    cst.setString(2,ri); cst.setString(3,cal); cst.setString(4,st); cst.setString(5,logonId); cst.execute();
    int result = cst.getInt(1);

    ...Below is the description for the getInt() method

    getInt
    public int getInt(int parameterIndex)
    throws SQLException
    Gets the value of a JDBC INTEGER parameter as an int in the Java programming language.
    Parameters:
    parameterIndex - the first parameter is 1, the second is 2, and so on
    Returns:
    the parameter value. If the value is SQL NULL, the result is 0.
    Throws:
    SQLException - if a database access error occurs

    My question is:
    If the getInt returns 0 for a SQL NULL, how do we differentiate between the actual 0 the procedure is returning and the 0 which is meant to be a null.
    The same is the case with getBoolean() which returns a false for SQL NULL. So how do we differentiate between the false which the procedure is returning and the false which meant to be a SQL NULL....
    I appreciate any help.
    Thanks,

    DB:2.44:Return Value Of Getint On Callablestatement d7

    Call CallableStatement.wasNull() right after calling getInt().

  • RELEVANCY SCORE 2.44

    DB:2.44:File Doesnt Exist / Returns False 3c


    Hi Folks,

    I was just mucking around with some file IO and I used the following code to try verify a files existence before trying to open it:

    File Temp1 = new File(fullyQualifiedFileName);
    System.out.println(Temp1.getAbsolutePath());
    doesExist = Temp1.exists();
    System.out.println(fullyQualifiedFileName);
    System.out.println("Does "+ fullyQualifiedFileName +" Exist? -"+doesExist);

    The path prints correctly, the file does exist at the location give, the filename is correct but for some reason it returns false. Any ideas?

    Dave

    DB:2.44:File Doesnt Exist / Returns False 3c

    Does the user have access rights to the file?

  • RELEVANCY SCORE 2.44

    DB:2.44:How To Get A Value From Javascript a3



    How to get return value from Java Script and catch it in c++ code. I have tried following code, but its not working in my case.

    what I want is if it returns true then call some function if it returns false then do nothing, so how to get those values in c++

    ScriptData::ScriptDataType fDataType = resultData.GetType();

    if (fDataType == kTrue)

    {

    CAlert::InformationAlert("sucess");

    //call some function

    }

    else

    {

    CAlert::InformationAlert("Error");

    // do nothing

    }

    JavaScript Code:

    if(app.scriptArgs.isDefined("paramkeyname1"))

    {

    var value = app.scriptArgs.get("paramkeyname1");

    alert(value);

    return true;

    }

    else

    {

    alert ("SORRY");

    return false;

    }

    DB:2.44:How To Get A Value From Javascript a3


    I have the Exactly same problem.

    I can't find anywhere how to got the JS return.

    I just need to get true or false.

    Any help would be appreciated.

  • RELEVANCY SCORE 2.44

    DB:2.44:Wtsqueryusertoken() Gives Error_Privilege_Not_Held s8


    hi all,
    I want to run .exe from service program in vista, which have run in user session insted of service session as session0.
    I tried following code, but it fails at 'WTSQueryUserToken' function giving error : error number1314: A required privilege is not held by the client.
    In MSDN I see that what I'm getting is the errorERROR_PRIVILEGE_NOT_HELD which means:The caller does not have theSE_TCB_NAME privilege. How can I set this previledge?
     
    Here is my source:
     
    HANDLE hTokenNew = NULL, hTokenDup = NULL;HMODULE  hmod = LoadLibrary(kernel32.dll);PVOID proc = GetProcAddress(hmod, WTSGetActiveConsoleSessionId); DWORD dwSessionId = WTSGetActiveConsoleSessionId();   
                
    f(!WTSQueryUserToken(dwSessionId, hTokenNew)){    ErrorExit(WTSQueryUserToken);}   DuplicateTokenEx(hTokenNew,MAXIMUM_ALLOWED,NULL,SecurityIdentification,TokenPrimary,hTokenDup);WriteToFile(Calling lpfnCreateEnvironmentBlock);
    ZeroMemory( si, sizeof( STARTUPINFO ) );si.cb = sizeof( STARTUPINFO );si.lpDesktop = winsta0\\default;
     
    LPVOID  pEnv = NULL;DWORD dwCreationFlag = NORMAL_PRIORITY_CLASS | CREATE_NEW_CONSOLE;HMODULE hModule = LoadLibrary(Userenv.dll);if(hModule ){PVOID _imp_CreateEnvironmentBlock = GetProcAddress( hModule, CreateEnvironmentBlock );  if( _imp_CreateEnvironmentBlock != NULL )  {      if(CreateEnvironmentBlock(pEnv, hTokenDup, FALSE))   {    WriteToFile(CreateEnvironmentBlock Ok);    dwCreationFlag |= CREATE_UNICODE_ENVIRONMENT;       }   else   {    pEnv = NULL;   }  } }   ZeroMemory( pi,sizeof(pi));  if ( !CreateProcessAsUser(  hTokenDup,  NULL,  E:\\example.exe,    NULL,  NULL,  FALSE,  dwCreationFlag,  pEnv,  NULL,  si,  pi  ) ) {  ErrorExit(CreareProcessAsUser);  return FALSE;  //goto RESTORE; }
     
    Please reply,
    thanks in advance

    DB:2.44:Wtsqueryusertoken() Gives Error_Privilege_Not_Held s8

    Most LocalSYSTEM services may have it, but services running under other identities typically don't.

  • RELEVANCY SCORE 2.43

    DB:2.43:Createprocessasuser Returns Error Code As Error_Invalid_Owner aj


    Hi, I have used CreateProcessAsUser(..) along with LogonUser(..) methods to execute theprocess(batch file) in remote machine.
    I was able to execute the process using CreateProcessAsUser but an error code is also being returned.i.e ERROR_INVALID_OWNER.
    Here is the code snippet.
    if(!LogonUser(remoteuser, remotedomain, remotepassword, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, token)){dwErr = GetLastError();}
    memset(StartupInfo, 0, sizeof(StartupInfo));StartupInfo.cb=sizeof(StartupInfo);StartupInfo.dwFlags = STARTF_USESHOWWINDOW;StartupInfo.wShowWindow = SW_MINIMIZE;StartupInfo.lpDesktop = winsta0\\default;ProcessInfo.hProcess = NULL;ProcessInfo.hThread = NULL;
    if ( !ObtainSecurityIdentifier( hToken, psid ) ){SetProcessWindowStation( winstaolder ); return -1;}
    // add user to interactive windowstationif ( !AddAceStation( winsta, psid ) ){SetProcessWindowStation( winstaolder ); return -1;}
    // add user to default desktopif ( !AddAceDesktop( hdesktop, psid ) ){SetProcessWindowStation( winstaolder );return -1;}
    RemoveSid( psid );
    CloseWindowStation( winsta );
    CloseDesktop( hdesktop );
    rc = CreateProcessAsUser(token, NULL, cmdline, NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS | CREATE_NEW_CONSOLE, NULL, NULL, StartupInfo, ProcessInfo);
    dwErr = GetLastErrorThe program gets executed successfully but still I get an error code as ERROR_INVALID_OWNER.Please let me know what could be the reason for error code.

    DB:2.43:Createprocessasuser Returns Error Code As Error_Invalid_Owner aj

    Hello Dayakar,
    As you specified it looks like CreateProcessAsUser fails to invokethe process ifspecified token does not have admin previlages.
    Not exactly, the token we need to provide(the first parameter)depends on the the created process. If the process need admin privileges, we need to provide admin token. However, typically, the process that calls the CreateProcessAsUser function must have the SE_INCREASE_QUOTA_NAME privilege and may require the SE_ASSIGNPRIMARYTOKEN_NAME privilege if the token is not assignable.
    See:http://msdn.microsoft.com/en-us/library/ms682429(VS.85).aspx
    Regards,Rong-Chun ZhangMSDN Subscriber Support in ForumIf you have any feedback on our support, please contact msdnmg@microsoft.com Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

  • RELEVANCY SCORE 2.43

    DB:2.43:Ldap Integration With Active Directory 3m


    I have successfully enabled Solaris 10 to bind to my Windows 2003 AD server; however, when I query with ldaplist database I receive an error "Unavailable critical extension."

    Using ethereal, I'm 95% sure that the ldaplist command is forcing the VLV criticality=true; in which MS AD responds with the error above.

    Of course, the answer is to have Microsoft correct their code, since a basic ldapsearch query [ldapsearch -b "" -h ip -s base objectclass=\*] returns that the VLV is a supportedControl.

    In the meantime, can I turn VLV criticality=false for any ldaplist command?

    Thanks . . . Spencer

    DB:2.43:Ldap Integration With Active Directory 3m

    I have successfully enabled Solaris 10 to bind to my Windows 2003 AD server; however, when I query with ldaplist database I receive an error "Unavailable critical extension."

    Using ethereal, I'm 95% sure that the ldaplist command is forcing the VLV criticality=true; in which MS AD responds with the error above.

    Of course, the answer is to have Microsoft correct their code, since a basic ldapsearch query [ldapsearch -b "" -h ip -s base objectclass=\*] returns that the VLV is a supportedControl.

    In the meantime, can I turn VLV criticality=false for any ldaplist command?

    Thanks . . . Spencer

  • RELEVANCY SCORE 2.43

    DB:2.43:Client Wont Check In. 79


    We are working on getting the SCCM client installed on all of our workstations. On ones that we can't send through SCCM, we have people go onsite and set the prerequisites on the machine and then manually install it. This particular computer won't check-in. It meets all of the requirements, but I'm not sure what is happening now. Here is the info in located in the log. Failed to instantiate UI Server {C2F23AE4-82D8-456F-A4AF-A2655D8CA726} with error 8000401a execmgr 1/6/2010 12:19:37 PM 1660 (0x067C) Failed to instantiate UI Server 2 {E8425D59-451B-4978-A2AB-641470EB7C02} with error 8000401a execmgr 1/6/2010 12:19:37 PM 1660 (0x067C) Failed to instantiate Updates UI Server {2D023958-73D0-4542-8AD6-9A507364F70E} with error 8000401a execmgr 1/6/2010 12:19:37 PM 1660 (0x067C) Failed to instantiate VApp UI Server {00AAB372-0D6D-4976-B5F5-9BC7605E30BB} with error 0x8000401A execmgr 1/6/2010 12:19:37 PM 1660 (0x067C) CUIEventGenerator::ClearNewProgramAvailable entered execmgr 1/6/2010 12:19:37 PM 1660 (0x067C) CUIEventGenerator::ClearNewProgramAvailable entered execmgr 1/6/2010 12:19:37 PM 1660 (0x067C) CExecutionManager::CExecutionManager() execmgr 1/6/2010 12:23:33 PM 2664 (0x0A68) CExecutionManager::FinalConstruct() execmgr 1/6/2010 12:23:33 PM 2664 (0x0A68) WTSQueryUserToken[2](SessionID=0) failed with GLE=1245 execmgr 1/6/2010 12:23:33 PM 2664 (0x0A68) WTSQueryUserToken[2](SessionID=0) failed with GLE=1245 execmgr 1/6/2010 12:23:33 PM 2664 (0x0A68) WTSQueryUserToken[2](SessionID=0) failed with GLE=1245 execmgr 1/6/2010 12:23:33 PM 2664 (0x0A68) Failed to get current logon user token, 0x800704dd execmgr 1/6/2010 12:23:34 PM 2664 (0x0A68) CExecutionRequestManager::Initialize System execmgr 1/6/2010 12:23:34 PM 2664 (0x0A68) Software distribution is not paused execmgr 1/6/2010 12:23:34 PM 2664 (0x0A68) CExecutionManager::Successfully registered for ServiceWindow Events execmgr 1/6/2010 12:23:34 PM 2664 (0x0A68) A user has logged on. execmgr 1/6/2010 12:24:36 PM 3436 (0x0D6C) CCacheManager::CCacheManager execmgr 1/6/2010 12:24:36 PM 3436 (0x0D6C) CContentAccessService::CContentAccessService() execmgr 1/6/2010 12:24:36 PM 3436 (0x0D6C) CContentAccessService::FinalConstruct() execmgr 1/6/2010 12:24:36 PM 3436 (0x0D6C) The logged on user is INT\CVJones execmgr 1/6/2010 12:24:36 PM 3436 (0x0D6C) Common Client Agent Settings for the client are missing from WMI. execmgr 1/6/2010 12:24:36 PM 3436 (0x0D6C)

    DB:2.43:Client Wont Check In. 79

    Is there an easy fix for this? This our next huge problem that we are going to address. I readthat we should repair the WMI instead of rebuilding it due to a reinstall causing possible problems.

  • RELEVANCY SCORE 2.43

    DB:2.43:Wtsqueryusertoken In Winlogon a9


    Hi, I am being asked to display a warning UI on either the default or winlogon desktop via a service. Everything works fine in XP. In Vista, When I call WTSQueryUserToken with the logon desktop active it always returns error 1008; it works fine when the default desktop is active. Also, I am not able to determine which desktop is active in Vista - it always returns 'default' even before anyone is logged on.BTW, I read a couple of related threads in this group and tried some of the solutions but none seem to work while the Winlogon desktop is active.Thanks in advance,Steve.

    DB:2.43:Wtsqueryusertoken In Winlogon a9

    This exactly what I need to do right now. I am aware of the risks but I need to be able to do this for my current project. I would really appreciate if it you could provide a solution.

  • RELEVANCY SCORE 2.43

    DB:2.43:Imediaobject-Processoutput Problem z1


    Hi everyone!
    I have a problem with audio detection with Kinect.
    DMO-ProcessOutput returns the error code 0x800401F0.
    I give up and have no idea how to solve it.
    There is full code:
    Set audio stream
    /// summary
    /// Start processing stream
    /// /summary
    /// returnsIndicates success or failure/returns
    bool UKinect::setAudioStream()
    {
    // Get the audio source
    hr = sensor-NuiGetAudioSource(pNuiAudioSource);
    if (FAILED(hr))
    {
    cerr [UKinect] ERROR: Failed to get Audio Source. endl;
    return false;
    }

    hr = pNuiAudioSource-QueryInterface(IID_IMediaObject, (void**)pDMO);
    if (FAILED(hr))
    {
    cerr [UKinect] ERROR: Failed to access the DMO (in audio). endl;
    return false;
    }

    hr = pNuiAudioSource-QueryInterface(IID_IPropertyStore, (void**)pPropertyStore);
    if (FAILED(hr))
    {
    cerr [UKinect] ERROR: Failed to access the Audio Property store. endl;
    return false;
    }

    // Set AEC-MicArray DMO system mode. This must be set for the DMO to work properly.
    // Possible values are:
    // SINGLE_CHANNEL_AEC = 0
    // OPTIBEAM_ARRAY_ONLY = 2
    // OPTIBEAM_ARRAY_AND_AEC = 4
    // SINGLE_CHANNEL_NSAGC = 5
    PROPVARIANT pvSysMode;
    PropVariantInit(pvSysMode);
    pvSysMode.vt = VT_I4;
    pvSysMode.lVal = (LONG)(4); // Use OPTIBEAM_ARRAY_ONLY setting. Set OPTIBEAM_ARRAY_AND_AEC instead if you expect to have sound playing from speakers.
    pPropertyStore-SetValue(MFPKEY_WMAAECMA_SYSTEM_MODE, pvSysMode);
    PropVariantClear(pvSysMode);

    // Set DMO output format
    WAVEFORMATEX wfxOut = {AudioFormat, AudioChannels, AudioSamplesPerSecond, AudioAverageBytesPerSecond, AudioBlockAlign, AudioBitsPerSample, 0};
    DMO_MEDIA_TYPE mt = {0};
    hr = MoInitMediaType(mt, sizeof(WAVEFORMATEX));
    if (FAILED(hr))
    {
    cerr [UKinect] ERROR: Init audio media type structure. endl;
    return false;
    }

    mt.majortype = MEDIATYPE_Audio;
    mt.subtype = MEDIASUBTYPE_PCM;
    mt.lSampleSize = 0;
    mt.bFixedSizeSamples = TRUE;
    mt.bTemporalCompression = FALSE;
    mt.formattype = FORMAT_WaveFormatEx;
    memcpy_s(mt.pbFormat, sizeof(WAVEFORMATEX), wfxOut, sizeof(WAVEFORMATEX));

    hr = pDMO-SetOutputType(0, mt, 0);
    if (FAILED(hr))
    {
    cerr [UKinect] ERROR: Set audio output type. endl;
    return false;
    }
    MoFreeMediaType(mt);

    cout [UKinect] INFO: Audio stream has been created. endl;

    return true;
    }

    and pooling function called every 20-50ms
    /// summary
    /// Get the audio readings from the stream
    /// /summary
    bool UKinect::poolAudio()
    {
    if (pNuiAudioSource pDMO)
    {
    // Set buffer
    DWORD dwStatus;
    DMO_OUTPUT_DATA_BUFFER outputBuffer = {0};
    outputBuffer.pBuffer = captureBuffer;

    do
    {
    captureBuffer.Init(0);
    outputBuffer.dwStatus = 0;

    // Process audio data
    hr = pDMO-ProcessOutput(0, 1, outputBuffer, dwStatus);
    if (FAILED(hr))
    {
    cout hex hr endl;
    return false;
    }




    if (S_OK == hr)
    {
    // Get the reading
    double beamAngle, sourceAngle, sourceConfidence;
    if (SUCCEEDED(pNuiAudioSource-GetBeam(beamAngle)) SUCCEEDED(pNuiAudioSource-GetPosition(sourceAngle, sourceConfidence)))
    {
    // Set reading to UVars
    audioBeamAngle = static_castfloat((180.0 * beamAngle) / M_PI);
    audioSourceAngle = static_castfloat((180.0 * sourceAngle) / M_PI);
    audioSourceConfidence = sourceConfidence;
    } else {
    cerr [UKinect] ERROR: Getting audio beam, position and source. endl;
    return false;
    }
    } else {
    cerr [UKinect] ERROR: Process audio output. endl;
    return false;
    }
    } while (outputBuffer.dwStatus DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE); //Check if there is still remaining data
    } else {
    cerr [UKinect] ERROR: Pool audio. endl;
    return false;
    }
    return true;
    }

    DB:2.43:Imediaobject-Processoutput Problem z1

    You are the best :) !!!
    You save a lot of my time. Thank you very much and regards.

  • RELEVANCY SCORE 2.42

    DB:2.42:Determine The Current Active Session Of User In Windows Server 2008 x8


    Hi, I have an requirement of invoking a batch file through terminal services. I have used CreateProcessAsUSer API to invoke an batch from service. This method used to work fine in WindowsXP. To make it work for Windows Vista and Windows 7 operating system
    as sessionid is different for applications and services I was forced to add below code to get the token associated with the sessionid related to user. DWORD dwSessionid = GetActiveSessionId(); //get Active UI session bRet = WTSQueryUserToken (dwSessionid,
    hTokenthis); if (!LookupPrivilegeValue(NULL,SE_DEBUG_NAME,luid)) { printf(Lookup Privilege value Error: %u\n,GetLastError()); } tp.PrivilegeCount =1; tp.Privileges[0].Luid =luid; tp.Privileges[0].Attributes =SE_PRIVILEGE_ENABLED; bRet = false;
    bRet = DuplicateTokenEx(hTokenthis, MAXIMUM_ALLOWED,NULL, SecurityIdentification, TokenPrimary, htoken); //Adjust Token privilege SetTokenInformation(hTokenthis,TokenSessionId,(void*)dwSessionid,sizeof(DWORD)); if (!AdjustTokenPrivileges(hTokenthis,FALSE,tp,sizeof(TOKEN_PRIVILEGES),(PTOKEN_PRIVILEGES)NULL,NULL))
    { int abc =GetLastError(); printf(Adjust Privilege value Error: %u\n,GetLastError()); } if (GetLastError()== ERROR_NOT_ALL_ASSIGNED) { printf(Token does not have the provilege\n); } LPVOID pEnv =NULL; if(CreateEnvironmentBlock(pEnv,hUserTokenDup,TRUE))
    { dwCreationFlags|=CREATE_UNICODE_ENVIRONMENT; } else pEnv=NULL; ----------------------------------- Call CreateProcessAsUser ----------------------------------- //Definition of GetActiveSessionId DWORD GetActiveSessionId() { PHANDLE currentToken = 0; PHANDLE
    primaryToken = 0; int dwSessionId = 0; PHANDLE hUserToken = 0; PHANDLE hTokenDup = 0; PWTS_SESSION_INFO pSessionInfo = 0; DWORD dwCount = 0; WTSEnumerateSessions(WTS_CURRENT_SERVER_HANDLE, 0, 1, pSessionInfo, dwCount); int dataSize = sizeof(WTS_SESSION_INFO);
    for (DWORD i = 0; i dwCount; i) { WTS_SESSION_INFO si = pSessionInfo[i]; if (WTSActive == si.State) { dwSessionId = si.SessionId; break; } } return dwSessionId; } After adding the above code, my code works for XP, Vista and Windows 7. BUT, Windows Server
    2008 can have more than one active sessions at a time and it also allows the same user to login from machines. For ex: Server 2008 allows the user Administrator to login to in x machine and with the same user Administrator server 2008 allows to login from
    y machine. Therefore there can be more than one active sessions from same/different users. Is there any way to determine the current Active session of user?

    DB:2.42:Determine The Current Active Session Of User In Windows Server 2008 x8

    Hi, I have an requirement of invoking a batch file through terminal services. I have used CreateProcessAsUSer API to invoke an batch from service. This method used to work fine in WindowsXP. To make it work for Windows Vista and Windows 7 operating system
    as sessionid is different for applications and services I was forced to add below code to get the token associated with the sessionid related to user. DWORD dwSessionid = GetActiveSessionId(); //get Active UI session bRet = WTSQueryUserToken (dwSessionid,
    hTokenthis); if (!LookupPrivilegeValue(NULL,SE_DEBUG_NAME,luid)) { printf(Lookup Privilege value Error: %u\n,GetLastError()); } tp.PrivilegeCount =1; tp.Privileges[0].Luid =luid; tp.Privileges[0].Attributes =SE_PRIVILEGE_ENABLED; bRet = false;
    bRet = DuplicateTokenEx(hTokenthis, MAXIMUM_ALLOWED,NULL, SecurityIdentification, TokenPrimary, htoken); //Adjust Token privilege SetTokenInformation(hTokenthis,TokenSessionId,(void*)dwSessionid,sizeof(DWORD)); if (!AdjustTokenPrivileges(hTokenthis,FALSE,tp,sizeof(TOKEN_PRIVILEGES),(PTOKEN_PRIVILEGES)NULL,NULL))
    { int abc =GetLastError(); printf(Adjust Privilege value Error: %u\n,GetLastError()); } if (GetLastError()== ERROR_NOT_ALL_ASSIGNED) { printf(Token does not have the provilege\n); } LPVOID pEnv =NULL; if(CreateEnvironmentBlock(pEnv,hUserTokenDup,TRUE))
    { dwCreationFlags|=CREATE_UNICODE_ENVIRONMENT; } else pEnv=NULL; ----------------------------------- Call CreateProcessAsUser ----------------------------------- //Definition of GetActiveSessionId DWORD GetActiveSessionId() { PHANDLE currentToken = 0; PHANDLE
    primaryToken = 0; int dwSessionId = 0; PHANDLE hUserToken = 0; PHANDLE hTokenDup = 0; PWTS_SESSION_INFO pSessionInfo = 0; DWORD dwCount = 0; WTSEnumerateSessions(WTS_CURRENT_SERVER_HANDLE, 0, 1, pSessionInfo, dwCount); int dataSize = sizeof(WTS_SESSION_INFO);
    for (DWORD i = 0; i dwCount; i) { WTS_SESSION_INFO si = pSessionInfo[i]; if (WTSActive == si.State) { dwSessionId = si.SessionId; break; } } return dwSessionId; } After adding the above code, my code works for XP, Vista and Windows 7. BUT, Windows Server
    2008 can have more than one active sessions at a time and it also allows the same user to login from machines. For ex: Server 2008 allows the user Administrator to login to in x machine and with the same user Administrator server 2008 allows to login from
    y machine. Therefore there can be more than one active sessions from same/different users. Is there any way to determine the current Active session of user?

  • RELEVANCY SCORE 2.42

    DB:2.42:X509chain.Build Returns False 38


    Hi,
    Can anyone help me resolve an issue that I am facing while building a X509Chain for a certific ate from my store. Actually X509Chain.Build(X509certificate) returns false with revocationmode as online and revocationflag as endcertificateonle. Code lines are
    as follows:

    X509Chain

    ch = new
    X509Chain();

    ch.ChainPolicy.RevocationMode =

    X509RevocationMode.Online;

    ch.ChainPolicy.RevocationFlag =

    X509RevocationFlag.EndCertificateOnly;

    ch.ChainPolicy.UrlRetrievalTimeout =

    new
    TimeSpan(0, 1, 0);

    ch.ChainPolicy.VerificationFlags =

    X509VerificationFlags.NoFlag;

    ch.Build(certificate);
    //This line returns me false value cuz I got two chainstatus i.e.
    RevocationStatusUnknown and Offlinerevocation

    Can anyone help me to sort it out.ASAP

    DB:2.42:X509chain.Build Returns False 38

    This forum is intended to help IT pros with questions and issues around Rights Management Services in Windows Server. You'd probably get a better response by posting your question in a developer-oriented forum on MSDN (http://social.msdn.microsoft.com/Forums/en-US/categories).

  • RELEVANCY SCORE 2.42

    DB:2.42:Sccm Software Update Deployment 18


    Hi Everyone,
    I want to deploy Software updates via SCCM, but want to save disk space hence I used download updates directly from Microsoft Server.
    I followed the guide http://www.windows-noob.com/forums/index.php?/topic/624-configuring-software-update-point-within-sccm/
    and install IISWebDAV, WSUS SP2, SUP Role, Deployment Template, Deployment Package and Created Search Folders.

    I can see updates in search folders but when i select an update and click Deploy Software Update finished the wizard but nothing happen on client Computer...
    Tried Re-Booting, initiated Software Update Scan Cycle and Software Update Deployment Evaluation cycle action from Configuration Manager Client but of no use.
    I checked UpdatesDeployment.log, I got the following error

    ![LOG[Failed to retrieve current (user,session) pair (0x80070002).]LOG]!time=05:14:00.939420 date=08-23-2011 component=UpdatesDeploymentAgent context= type=2 thread=4016 file=usertoken.cpp:1144
    ![LOG[::GetSMSConsoleSessionId - No SMS console session found.]LOG]!time=05:14:00.939420 date=08-23-2011 component=UpdatesDeploymentAgent context= type=1 thread=4016 file=usertoken.cpp:135
    ![LOG[WTSQueryUserToken[2](SessionID=-1) failed with GLE=1008]LOG]!time=05:14:00.939420 date=08-23-2011 component=UpdatesDeploymentAgent context= type=1 thread=4016 file=usertoken.cpp:874
    ![LOG[WTSQueryUserToken[2](SessionID=-1) failed with GLE=1008]LOG]!time=05:14:01.439420 date=08-23-2011 component=UpdatesDeploymentAgent context= type=1 thread=4016 file=usertoken.cpp:874
    ![LOG[WTSQueryUserToken[2](SessionID=-1) failed with GLE=1008]LOG]!time=05:14:01.939420 date=08-23-2011 component=UpdatesDeploymentAgent context= type=1 thread=4016 file=usertoken.cpp:874
    ![LOG[Error getting logged on user token. Code 0x800703f0]LOG]!time=05:14:02.439420 date=08-23-2011 component=UpdatesDeploymentAgent context= type=3 thread=4016 file=usertoken.cpp:1032
    ![LOG[Total Pending reboot updates = 0]LOG]!time=05:14:02.439420 date=08-23-2011 component=UpdatesDeploymentAgent context= type=1 thread=4016 file=updatesmanager.cpp:651

    DB:2.42:Sccm Software Update Deployment 18

    i've modified the guide to explain more clearly that the deadline must be set in order for the updates being mandatory, thanks Peter :)

    My step by step
    SCCM Guides
    I'm on Twitter ncbrady

  • RELEVANCY SCORE 2.42

    DB:2.42:Endupdateresource Error Code 5 c9


    Hello,
     
    I'm trying to generate a string resource-only DLL, doing so by starting with a DLL containing nothing but an empty resource section and then adding string blocks using BeginUpdateResource, UpdateResource and EndUpdateResource. I'm calling these using Platform Invoke from C#, but that shouldn't really matter.
     
    Now, to the actual problem. String resources are organized in blocks of 16 strings, so if I have N blocks to write, it'd be:
     
    BeginUpdateResource
    N * UpdateResource (once for each block)
    EndUpdateResource
     
    Now, once N = 85, EndUpdateResource returns false, and GetLastError returns error code 13 (ERROR_INVALID_DATA).
     
    So I tried writing it in chunks:
     
    K *
    {

    BeginUpdateResource
    64 * UpdateResource (once for each block)
    EndUpdateResource
    }
     
    Now I don't get error code 13 anymore, in fact, it works in most cases. But in about 1 of 5 tries (or worse if I have more chunks), EndUpdateResource returns false, and GetLastError returns error code 5 (ERROR_ACCESS_DENIED). My guess here is that the DLL file is still being used or something like that, but normally, that shouldn't be the case since EndUpdateResource shouldn't return before it's done, or does it?
     
    So how do I fix either the first or the second error?
     
    Thanks in advance

    DB:2.42:Endupdateresource Error Code 5 c9

    Hello,
     
    I'm trying to generate a string resource-only DLL, doing so by starting with a DLL containing nothing but an empty resource section and then adding string blocks using BeginUpdateResource, UpdateResource and EndUpdateResource. I'm calling these using Platform Invoke from C#, but that shouldn't really matter.
     
    Now, to the actual problem. String resources are organized in blocks of 16 strings, so if I have N blocks to write, it'd be:
     
    BeginUpdateResource
    N * UpdateResource (once for each block)
    EndUpdateResource
     
    Now, once N = 85, EndUpdateResource returns false, and GetLastError returns error code 13 (ERROR_INVALID_DATA).
     
    So I tried writing it in chunks:
     
    K *
    {

    BeginUpdateResource
    64 * UpdateResource (once for each block)
    EndUpdateResource
    }
     
    Now I don't get error code 13 anymore, in fact, it works in most cases. But in about 1 of 5 tries (or worse if I have more chunks), EndUpdateResource returns false, and GetLastError returns error code 5 (ERROR_ACCESS_DENIED). My guess here is that the DLL file is still being used or something like that, but normally, that shouldn't be the case since EndUpdateResource shouldn't return before it's done, or does it?
     
    So how do I fix either the first or the second error?
     
    Thanks in advance

  • RELEVANCY SCORE 2.41

    DB:2.41:The Comment For Commonlocation.Sourcespan d3


    // Summary:
    // The location within the syntax tree that this error is associated with.
    //
    // Remarks:
    // If IsInSource returns False this method returns an empty TextSpan which starts
    // at position 0.

    What does the 'error' refers to?
    Should it be
    // The location within the syntax tree that this symbol is associated with.

    ???

    DB:2.41:The Comment For Commonlocation.Sourcespan d3

    This is a bug with the xml doc comment that relates to the fact that CommonLocation was first used as part of Diagnostics. It looks like the comment wasn't updated when we started using CommonLocation for more than just errors.
    I've updated the comment on our internal builds. Thanks for the report!-- Kevin Pilch-Bisson kevinpi@microsoft.com

  • RELEVANCY SCORE 2.41

    DB:2.41:Rlock() Function Returns False 1p


    Hi all,
    In my vfp code I am using RLOCK(AliasName) to lock a record, but it returns false for some times and returns true for some time.
    At that moment where RLOCK() calls,
    1. Record is not locked by another user. (ISRLOCK() returns false)
    2. Table is not used in exclusive mode. (ISEXCLUSIVE(aliasname) returns false)
    3. Table is not open in different aliases.
    4. buffer mode is 1. (CURSORGETPROP(Buffering,AliasName) returns 1)
    Can anybody find a reason why this RLOCK(AliasName) returns false here?
    I suppose this happened after the application is registered in the machine. In this process it is updating Windows Registry nodes with the key value. Would that be a cause of this problem?
    Regards,

    DB:2.41:Rlock() Function Returns False 1p

    Just a note: ISEXCLUSIVE() can return .T. even when you issue following command:
    USE SomeTable SHARED AGAIN ALIAS SomeAlias
    Of course, in such case it points to some improper DBF file handling and you should fix your code.

  • RELEVANCY SCORE 2.40

    DB:2.40:Vista Service Showwindow Problem sz


    Hi, I'm developing a service, which runs a process which should interact with an active user's desktop. The problem is that main window of just created process should be active. Running the service under win XP does the appropriate result, but running it under vista makes the window of just created process inactive. The code which creates a process in service is below:

    memset(StartupInfo, 0, sizeof
    (StartupInfo));
     StartupInfo.cb = sizeof
    (StartupInfo);
     StartupInfo.lpDesktop = winsta0\\default
    ;
     StartupInfo.dwFlags = STARTF_RUNFULLSCREEN | STARTF_USESHOWWINDOW;
     StartupInfo.wShowWindow = SW_SHOW;

    HANDLE hUserTokenDup;
     DWORD dSessId = WTSGetActiveConsoleSessionId();
     if
    (dSessId == 0xFFFFFFFF)
     throw
    CharException(%s
    , no session is currently attached to the console
    );

    if
    (!WTSQueryUserToken(dSessId, hUserTokenDup))
     throw
    CharException(%s
    , can not query user token
    );

    CreateProcessAsUser(hUserTokenDup, C:\\test.exe
    , 0, 0, 0, 0,
    CREATE_DEFAULT_ERROR_MODE | NORMAL_PRIORITY_CLASS, 0, C:\\,
     StartupInfo, _process_information);
     if
    (!_process_information.hProcess)
     {
     CloseHandle(hUserTokenDup);
     throw
    CharException(%s
    , TXT_CANNOT_CREATE_GAME_PROCESS);
    }

    CloseHandle(hUserTokenDup);

    DB:2.40:Vista Service Showwindow Problem sz

    Hi, I'm developing a service, which runs a process which should interact with an active user's desktop. The problem is that main window of just created process should be active. Running the service under win XP does the appropriate result, but running it under vista makes the window of just created process inactive. The code which creates a process in service is below:

    memset(StartupInfo, 0, sizeof
    (StartupInfo));
     StartupInfo.cb = sizeof
    (StartupInfo);
     StartupInfo.lpDesktop = winsta0\\default
    ;
     StartupInfo.dwFlags = STARTF_RUNFULLSCREEN | STARTF_USESHOWWINDOW;
     StartupInfo.wShowWindow = SW_SHOW;

    HANDLE hUserTokenDup;
     DWORD dSessId = WTSGetActiveConsoleSessionId();
     if
    (dSessId == 0xFFFFFFFF)
     throw
    CharException(%s
    , no session is currently attached to the console
    );

    if
    (!WTSQueryUserToken(dSessId, hUserTokenDup))
     throw
    CharException(%s
    , can not query user token
    );

    CreateProcessAsUser(hUserTokenDup, C:\\test.exe
    , 0, 0, 0, 0,
    CREATE_DEFAULT_ERROR_MODE | NORMAL_PRIORITY_CLASS, 0, C:\\,
     StartupInfo, _process_information);
     if
    (!_process_information.hProcess)
     {
     CloseHandle(hUserTokenDup);
     throw
    CharException(%s
    , TXT_CANNOT_CREATE_GAME_PROCESS);
    }

    CloseHandle(hUserTokenDup);

  • RELEVANCY SCORE 2.40

    DB:2.40:Problems With Anchored Object When Package z8



    I have problems with anchored objects when creating a package with indesign server, i have include a single script that targets to different files, one with an anchor in it and a second with no anchor.

    Rem HelloWorld.vbsSet app= CreateObject("InDesignServer.Application.CS3")app.PublishTerminology 4.0app.ScriptPreferences.Version = 4.0Rem Create a new document.Set myDocument = app.Open("c:\indesigntst\Anchored_Test.indd")Rem PackageIf Not myDocument.Package("c:\indesigntst\Anchored_Test\", False, False, False, False, False, False, False) thenMsgBox app.errorListErrors.Countend ifapp.Documents.Item(1).Close

    Set myDocument = app.Open("c:\indesigntst\HelloWorld.indd")Rem PackageIf Not myDocument.Package("c:\indesigntst\HelloWorld\", False, False, False, False, False, False, False) thenMsgBox app.errorListErrors.Countend ifmyDocument.Save "c:\indesigntst\ts.indd"app.Documents.Item(1).Close

    I don't see any error or alike, and package returns true, but no folder is created.

    Packaing of the same document works fine on desktop edition off indesign...

    Any ideas?

    DB:2.40:Problems With Anchored Object When Package z8


    I have problems with anchored objects when creating a package with indesign server, i have include a single script that targets to different files, one with an anchor in it and a second with no anchor.

    Rem HelloWorld.vbsSet app= CreateObject("InDesignServer.Application.CS3")app.PublishTerminology 4.0app.ScriptPreferences.Version = 4.0Rem Create a new document.Set myDocument = app.Open("c:\indesigntst\Anchored_Test.indd")Rem PackageIf Not myDocument.Package("c:\indesigntst\Anchored_Test\", False, False, False, False, False, False, False) thenMsgBox app.errorListErrors.Countend ifapp.Documents.Item(1).Close

    Set myDocument = app.Open("c:\indesigntst\HelloWorld.indd")Rem PackageIf Not myDocument.Package("c:\indesigntst\HelloWorld\", False, False, False, False, False, False, False) thenMsgBox app.errorListErrors.Countend ifmyDocument.Save "c:\indesigntst\ts.indd"app.Documents.Item(1).Close

    I don't see any error or alike, and package returns true, but no folder is created.

    Packaing of the same document works fine on desktop edition off indesign...

    Any ideas?

  • RELEVANCY SCORE 2.40

    DB:2.40:Java Code Help mj


    Can you people tell me how to start a boolean class,
    with a car.?

    it means public boolean atPistop();
    and then, it means a car stops at the pistop for a while, and it misses a turn, folloing its time in pitstop...

    i tried this, but it doenst seem to be working...

    i tried

    public boolean atPistop()
    {
    if (car == pitsop)
    return false;
    else
    return true;
    }

    it returns error..

    hows this...
    please help me...

    DB:2.40:Java Code Help mj

    try out this

    public boolean atPistop()
    {
    if (car == pitsop)
    return false;
    else
    return true;
    }

    change this statement if (car == pitsop) to if(car.equalsIgnoreCase(pitsop))
    and try it once

  • RELEVANCY SCORE 2.40

    DB:2.40:Starting Gui Application From Vista Service 7c


    I have a problem, and I hope I can get some help here.The task is to start a GUI application from a Windows Service in Windows Vista, so that the logged on user can see and use this GUI application.I searched already in some other places in the net and found some sample code but it is still not working.I tried the following steps in my code:1) LogonUser(MyAdmin,                    .,                    MyAdmin,                    LOGON32_LOGON_INTERACTIVE,                    LOGON32_PROVIDER_DEFAULT,                    hToken)) {2) CreateEnvironmentBlock(lpvEnv,                                 hToken,                                 TRUE)){3) GetUserProfileDirectory(hToken,                                  szUserProfile,                                  dwSize))4)     if (!CreateProcessWithLogonW(szUserName,                                  szUserDom,                                 szUserPwd,                                  LOGON_WITH_PROFILE,                                  NULL,                                  strProgram2Start,                                  CREATE_UNICODE_ENVIRONMENT,                                  lpvEnv,                                  szUserProfile,                                  si,                                  pi))                                 Result: Directory Name is not valid (267)When I try it like this:1) WTSQueryUserToken (WTSGetActiveConsoleSessionId(), hTokenthis);2) DuplicateTokenEx(hTokenthis, MAXIMUM_ALLOWED,NULL, SecurityIdentification, TokenPrimary, hToken);                                 3) CreateEnvironmentBlock(lpEnvironment, hToken, FALSE) 4) CreateProcessAsUser(hToken, // hToken                                  NULL, // lpApplicationName                                  strProgram2Start, // lpCommandLine                                    NULL, // lpProcessAttributes                                    NULL, // lpThreadAttributes                                    FALSE, // bInheritHandles                                    CREATE_UNICODE_ENVIRONMENT | NORMAL_PRIORITY_CLASS, // dwCreationFlags                                    lpEnvironment, // lpEnvironment                                    NULL, // lpDirectory                                    si, // lpStartupInfo                                    pi // lpProcessInfo                                    ))                                    I receive the error message that the application can not be initialized correctly (0xc0000142)Can anybody give me some hints what I'm doing wrong. I know there must be some way to start the GUI application from the service elevated in the right session so that the logged on user can use it. Help is very much appreciated :-).Thanks a lot Thomas

    DB:2.40:Starting Gui Application From Vista Service 7c

    DWORD dwErr = 0;    HANDLE processToken;    HANDLE pLogonToken = 0;    DWORD dwActiveConsoleSessionId = WTSGetActiveConsoleSessionId();    if(!::WTSQueryUserToken(dwActiveConsoleSessionId, pLogonToken))    {        dwErr = GetLastError();
     sprintf(szErr, 0x%08X, dwErr);

  • RELEVANCY SCORE 2.40

    DB:2.40:Accept Call Returns Error With The Code 1122. Not Able To Connect More Than 1 Clients . za



    accept call returns error with the code 1122. Not able to connect more than 1 clients .

  • RELEVANCY SCORE 2.40

    DB:2.40:Need Help In Returning Error Condition From Web Service 3x


    Hi,
    I need one help regarding webservice. Currently my web service is returning "true" value when it works fine without any issues but it returns "false" when any any error is encountered. So my question is, can we return error instead of string "false". I dont know how to return exact error from webservice. If you any idea then please mail me.
    Below is a small code snippet:
    System.out.println("User "+ userFullName + usrKey + " end date has been updated to "+usrEndDate +" in IDM DB");
    result = true;
    }
    }
    }
    catch (tcAPIException e) {
    log.error("Error in finding the user" + e.getMessage());
    result = false;
    } catch (tcUserNotFoundException e) {
    log.error("Error in getting user status" + e.getMessage());
    result = false;
    } catch (tcStaleDataUpdateException e) {
    log.error("Error in updating end date of user" + e.getMessage());
    result = false;
    }
    }catch (Exception e1) {
    e1.printStackTrace();
    result =false;
    }
    return result;
    }

    Here i want to return error instead of false. Can we do that?

    Thanks,
    Kalpana.

    DB:2.40:Need Help In Returning Error Condition From Web Service 3x

    instead of storing false store below
    use result=e1.getMessage();

    Edited by: Nishith Nayan on Feb 23, 2012 8:07 PM

  • RELEVANCY SCORE 2.40

    DB:2.40:Agl Functions Returning Gl_False But..... j3


    I am calling several AGL functions. A few of them return GL_FALSE, but when I call aglGetError, it returns the error code AGLNOERROR. What gives??
    The functions that are returning false are aglSetInteger, aglSetWindowRef, and aglEnable. Here is a sample of how I'm testing the return values.

    if(GL_FALSE == aglSetCurrentContext(_aglContext))
    {
    GLenum glErr = aglGetError();
    if(glErr != AGLNOERROR)
    {
    printf("aglSetCurrentContext failed at line %d with error code: %d\n", _LINE_, glErr);
    }
    else
    {
    printf("aglSetCurrentContext returned FALSE with error code %d at line %d\n", AGLNOERROR, _LINE_);
    }

    }

    Any idears?

    DB:2.40:Agl Functions Returning Gl_False But..... j3

    I am calling several AGL functions. A few of them return GL_FALSE, but when I call aglGetError, it returns the error code AGLNOERROR. What gives??
    The functions that are returning false are aglSetInteger, aglSetWindowRef, and aglEnable. Here is a sample of how I'm testing the return values.

    if(GL_FALSE == aglSetCurrentContext(_aglContext))
    {
    GLenum glErr = aglGetError();
    if(glErr != AGLNOERROR)
    {
    printf("aglSetCurrentContext failed at line %d with error code: %d\n", _LINE_, glErr);
    }
    else
    {
    printf("aglSetCurrentContext returned FALSE with error code %d at line %d\n", AGLNOERROR, _LINE_);
    }

    }

    Any idears?

  • RELEVANCY SCORE 2.40

    DB:2.40:Problems With Interactive Services Detection / Wts Api c9


    We wrote a port monitor extension for the windows sppoler which writes the data to a file. Afterwards, it runs a process as the currently logged on user by using CreateProcessAsUser().
    On newer Windows versions with the interactive services detection enabled this breaks. A warning message gets displayed, which warns the user that a application wants to display a window. After that window the GUI of our application is broken.

    After some searching I found that this could be fixed by changing the code as in [1]. When trying to get the needed token for CreateProcessAsUser() by calling WTSQueryUserToken() I always get privilege not held as the return code.

    Trying to change the privileges to add SE_TCB_NAME for the printer client by using AdjustTokenPrivileges() didn't work.
    Another thing that seems a little bit strange is that using the WTS functions by including wtsapi32.h didn't work out of the box.

    Maybe I am missing something here? Is this the correct way to fix the error or is there a different way?

    Thanks!

    DB:2.40:Problems With Interactive Services Detection / Wts Api c9

    I'd recommend following up with Microsoft support for this question.
    http://support.microsoft.com/?wa=wsignin1.0
    Please also be aware that port monitors do not work with v4 print drivers. That doesn't sound like your issue, but just wanted to make sure you know.

    Thanks!
    Justin

  • RELEVANCY SCORE 2.39

    DB:2.39:Windows 8 Mapped Drives Paths Not Recognized Correctly By Service m9


    I am facing a problem in Windows 8 where an elevated application/service that impersonates the logged in user does not recognize the mapped drives paths correctly.

    I have a windows service that I use to copy files from/to different source paths/destinations including mapped network drives. The Paths are fed to the service through an xml file. The service then reads the source and destination from the xml and copies the
    file. I never had an issue with mapped drives in Vista and 7 as the service always impersonates the logged user by getting the explorer token and all my `CreateFile`, `ReadFile`s and `WriteFile` worked perfectly.

    This is how I impersonate the user

    first I get the session token using the following code

    DWORD GetActiveSessionId(DWORD ret)
    {
    ret=0;
    DWORD active_session_id = WTSGetActiveConsoleSessionId();
    if (IsSessionActive(active_session_id))
    {
    return active_session_id;
    }

    DWORD console_session_ID = active_session_id;
    active_session_id = -2;
    WTS_SESSION_INFO* session_info = NULL;
    DWORD num_sessions = 0;
    if (WTSEnumerateSessions(WTS_CURRENT_SERVER_HANDLE, 0, 1,
    session_info, num_sessions))
    {
    // Pick the first active session we can find
    for (DWORD i = 0 ; i num_sessions; i)
    {
    if (session_info[i].State == WTSActive)
    {
    // There is a user logged on to the WinStation associated with the
    // session.
    active_session_id = session_info[i].SessionId;
    break;
    }
    }
    WTSFreeMemory(session_info);
    return active_session_id;
    }

    ret=::GetLastError();
    return -2;
    }


    BOOL GetSessionUserToken( HANDLE * phUserToken, DWORD retCode )
    {
    if( NULL == phUserToken )
    {
    return FALSE;
    }

    BOOL bRet = FALSE;
    HANDLE hImpersonationToken = NULL;

    BOOL bWin2K = FALSE;
    OSVERSIONINFOEX osv;
    ZeroMemory( osv, sizeof( OSVERSIONINFOEX ) );
    osv.dwOSVersionInfoSize = sizeof( OSVERSIONINFOEX );
    if( GetVersionEx( (OSVERSIONINFO*) osv ) )
    {
    if( 0 == osv.dwMinorVersion osv.dwMajorVersion == 5)
    {
    return FALSE;
    }
    }

    DWORD dwActiveSession= CGSSystem::GetActiveSessionId(retCode);

    if (dwActiveSession==GSInvalidSessionId)
    return FALSE;

    if( 0 != WTSQueryUserToken( dwActiveSession, hImpersonationToken ) )
    {
    bRet = TRUE;
    }
    else
    {

    }


    DWORD neededSize = 0;
    HANDLE *realToken = new HANDLE;
    if(GetTokenInformation(hImpersonationToken, (::TOKEN_INFORMATION_CLASS) TokenLinkedToken, realToken, sizeof(HANDLE), neededSize))
    {
    CloseHandle(hImpersonationToken);
    hImpersonationToken = *realToken;
    }
    DWORD lastError = GetLastError();
    delete realToken;


    if( TRUE == bRet )
    {
    bRet = DuplicateTokenEx( hImpersonationToken,
    0,
    NULL,
    SecurityImpersonation,
    TokenPrimary,
    phUserToken );

    CloseHandle( hImpersonationToken );
    }

    return bRet;
    }

    Then I have my `CopyFile` function which is a thread. It is a huge function so I will only mention the important (impersonation/security) parts.

    BOOL CopyFile(LPCTSTR source, LPCTSTR destination)
    {

    //Some variables initializations
    //...

    HRESULT hrInternal = CoInitializeSecurity(
    NULL, // Allow *all* VSS writers to communicate back!
    -1, // Default COM authentication service
    NULL, // Default COM authorization service
    NULL, // reserved parameter
    RPC_C_AUTHN_LEVEL_PKT_PRIVACY, // Strongest COM authentication level
    RPC_C_IMP_LEVEL_IDENTIFY, // Minimal impersonation abilities
    NULL, // Default COM authentication settings
    EOAC_NONE, // No special options
    NULL // Reserved parameter
    );

    //Initialize security descriptors
    SECURITY_DESCRIPTOR SD;
    SECURITY_ATTRIBUTES copyMutexAttrib;
    copyMutexAttrib.nLength = sizeof( SECURITY_ATTRIBUTES );
    copyMutexAttrib.lpSecurityDescriptor = SD;
    copyMutexAttrib.bInheritHandle = TRUE;

    if(!InitializeSecurityDescriptor( SD, SECURITY_DESCRIPTOR_REVISION ) )
    {
    //Error handling;

    }

    // add a NULL disc. ACL to the security descriptor.
    //
    if( ! SetSecurityDescriptorDacl( SD, TRUE, (PACL) NULL, FALSE ) )
    {
    //Error handling;

    }

    HRESULT hr=S_OK;
    hr=ModifyThreadPrivilege( SE_BACKUP_NAME, TRUE , m_hUserToken==NULL ? FALSE : TRUE );
    if (FAILED(hr))
    {
    //Error Handling and logs
    }

    hr=S_OK;
    hr=ModifyThreadPrivilege( SE_TCB_NAME, TRUE , m_hUserToken==NULL ? FALSE : TRUE );
    if (FAILED(hr))
    {
    //Error Handling and logs
    }
    hr=ModifyThreadPrivilege( SE_IMPERSONATE_NAME, TRUE , m_hUserToken==NULL ? FALSE : TRUE );
    if (FAILED(hr))
    {
    //Error Handling and logs
    }

    hr=ModifyThreadPrivilege( SE_MANAGE_VOLUME_NAME, TRUE , m_hUserToken==NULL ? FALSE : TRUE );
    if (FAILED(hr))
    {
    //Error Handling and logs
    }

    hr=ModifyThreadPrivilege( SE_SYSTEM_PROFILE_NAME, TRUE , m_hUserToken==NULL ? FALSE : TRUE );
    if (FAILED(hr))
    {
    //Error Handling and logs
    }

    hr=ModifyThreadPrivilege( SE_DEBUG_NAME, TRUE , m_hUserToken==NULL ? FALSE : TRUE );
    if (FAILED(hr))
    {
    //Error Handling and logs
    }


    //Other variable initializations
    //...

    //Create the destination file
    SECURITY_ATTRIBUTES sa;
    sa.nLength = sizeof(sa);
    sa.lpSecurityDescriptor = NULL;
    sa.bInheritHandle = TRUE;

    HANDLE hFile = ::CreateFile(destination, GENERIC_WRITE, FILE_SHARE_WRITE | FILE_SHARE_READ, sa,
    CREATE_ALWAYS, FILE_FLAG_WRITE_THROUGH|FILE_FLAG_BACKUP_SEMANTICS, NULL); //--- creates the file in the wrong location


    }

    In windows 8 and when the destination is a mapped drive like `Z:\MyFile.txt` it writes the file to the wrong location like so:

    I have mapped network drive `Z:` which is mapped to
    `\\nsa\public\myfolder1\subfolder\` the function writes the file to
    `\\nsa\public\`

    I have never had such behavior in Windows Vista or 7 but it seems that MS has introduced some new privileges or securities that are causing such behavior.

    I have noticed many people complaining about mapped drives in Windows 8, especially for elevated processes but all the solutions suggest to use UNC paths instead of the mapped drive letter.

    I also noticed that enabling/disabling UAC has no effect on this.

    Can someone explain how can I achieve my goal in copying the file?

  • RELEVANCY SCORE 2.39

    DB:2.39:Pxphysics Object Lost After Initialization - Nvidia Developer Forums da


    Hello!

    I just downloaded PhysX3.3 and for some reason my main physics object becomes null as soon as initialization code is finished.

    Definition:
    namespace g {


    // PhysX

    static PxPhysics* pPhysXSDK = NULL;

    PxFoundation* pPhysXFoundation;
    PxCooking* pPhysXCooking;
    PxScene* pPhysXScene;
    PxMaterial* pPxMaterial;
    };

    Initialization:
    bool InitializePhysX()
    {
    static PxDefaultErrorCallback gDefaultErrorCallback;
    static PxDefaultAllocator gDefaultAllocatorCallback;
    static PxSimulationFilterShader gDefaultSFS = PxDefaultSimulationFilterShader;

    g::pPhysXFoundation = PxCreateFoundation(PX_PHYSICS_VERSION, gDefaultAllocatorCallback, gDefaultErrorCallback);

    if(!g::pPhysXFoundation)
    {
    MessageBox(0, PxCreateFoundation() failed, Error, MB_ICONERROR);
    return false;
    }
    g::pPhysXSDK = PxCreatePhysics(PX_PHYSICS_VERSION, *g::pPhysXFoundation, PxTolerancesScale());

    if(!g::pPhysXSDK)
    {
    MessageBox(0, PxCreatePhysics() failed, Error, MB_ICONERROR);
    return false;
    }

    if(!PxInitExtensions(*g::pPhysXSDK))
    {
    MessageBox(0, PxInitExtensions() failed, Error, MB_ICONERROR);
    return false;
    }

    PxSceneDesc psd(g::pPhysXSDK-getTolerancesScale());
    psd.gravity = PxVec3(0.0f, -9.81f, 0.0f);
    if(!psd.cpuDispatcher)
    {
    PxDefaultCpuDispatcher* cpuDispatcher = PxDefaultCpuDispatcherCreate(1);
    if(!cpuDispatcher)
    {
    MessageBox(0, PxDefaultCpuDispatcherCreate() failed, Error, MB_ICONERROR);
    return false;
    }
    psd.cpuDispatcher = cpuDispatcher;
    }
    if(!psd.filterShader)
    {
    psd.filterShader = gDefaultSFS;
    }

    g::pPhysXScene = g::pPhysXSDK-createScene(psd);
    if(!g::pPhysXScene)
    {
    MessageBox(0, PhysXSDK-createScene() failed, Error, MB_ICONERROR);
    return false;
    }

    g::pPxMaterial = g::pPhysXSDK-createMaterial(0.5, 0.5, 0.5);

    g::pPhysXCooking = PxCreateCooking(PX_PHYSICS_VERSION, *g::pPhysXFoundation,
    PxCookingParams(g::pPhysXSDK-getTolerancesScale()));
    if(!g::pPhysXCooking)
    {
    MessageBox(0, PxCreateCooking() failed, Error, MB_ICONERROR);
    return false;
    }
    return true;
    }

    Initialization returns true, but as soon as I try to do anything that involves calling the main PxPhysics object (g::pPhysXSDK) - like: creating material, the application crashes with unhandled exception error because g::pPhysXSDK is 0.

    So I can use g::pPhysXSDK only inside InitializePhysX(). Meaning I can't do anything at runtime.. I don't think it's supposed to be this way.

  • RELEVANCY SCORE 2.39

    DB:2.39:Sms Packages Not Deployed On Windows Server 2003 Clients sz


     
    Hi Team,
     
    I am facing the software distribution issue in one of SMS client (Windows Server 2003), i have read almost every blogcast but still no soloution, Clients has been installed with policy and site code.
     
    Clients has been discoverd but no clients, i have reinstall the client by ccmclean and refersh the collection but still it is not showing, i think problem with client....
     
    Client location.log ::   locate MP and assigned site
    Locationservice.log  :: Current AD site of machine is ES_SEG
                                     Retrieved Proxy Management Point from AD: ES_SEG1B_DC001
                                     Attempting to retrieve local MP from AD
    Error logs :-
     
    CAS :-

       Software Distribution Site Settings for the client are missing from WMI.
       CacheConfig::InitializeFromWmi - GetSWDistSiteSettings failed with 0x80004005. Default site settings will be used
     
    Execmgr :-
     
    WTSQueryUserToken[2](SessionID=0) failed with GLE=1717
    Software Distribution Site Settings for the client are missing from WMI
    oftware distribution agent was enabled execmgr 10/1/2008 9:06:59 AM 3096 (0x0C18)

     
     
     
    Please give your comment on this, I need the soloution for urgent basis.
     
    Thanks in advance....
     
     

    DB:2.39:Sms Packages Not Deployed On Windows Server 2003 Clients sz

    Well, as the forum names suggest, these forums are only for Configuration Manager, and not SMS 2003. SMS 2003 is only supported on the public newsgroups, not in the forums. Sorry about that, but the forums people only want the current versions supported through the forums.
     
    The log file errors indicate to me that these clients have not received policies. If all else is working on those clients, being other tasks like inventory, then that likely isn't the case, but that's what it indicates.
     
    I'd post the question to the public newsgroup, where you'll find the SMS 2003 experts, or contact product support. It does sound like SMS is working fine itself, so something with those builds/security. I used to use Windows Server 2003 for my SMS 2003 VPC images back when we ran SMS 2003 labs at our conferences, including domain controllers. So I know it works.

  • RELEVANCY SCORE 2.39

    DB:2.39:C Request.Browser.Activexcontrols Returns False In Ie11 ss


    C#: Request.Browser.ActiveXControls returns false in IE11. Is this is a bug??
    what is an alternative of this to check if the ActiveX Control is supported on server side c# code?

    DB:2.39:C Request.Browser.Activexcontrols Returns False In Ie11 ss

    Hi there,

    I'm not exactly sure what this error code means, but you can try reseting Internet Explorer:
    http://windows.microsoft.com/en-gb/windows7/reset-internet-explorer-settings

    Thanks.

  • RELEVANCY SCORE 2.39

    DB:2.39:Call To Wtsqueryusertoken() Gives Error_Privilege_Not_Held fa


    I used the WTSQueryUserToken() function to obtain the primary access token of the logged-on user whose session-id I had obtained from a call to WTSGetActiveConsoleSessionId().
     
    My issue is that after the call to WTSQueryUserToken(), GetLastError() returns error number 1314: A required privilege is not held by the client.
     
    In MSDN I see that what I'm getting is the error ERROR_PRIVILEGE_NOT_HELD which means: The caller does not have the SE_TCB_NAME privilege. How should I go about getting that previledge now?
     
    Here is my source:
     

    Code Snippet

    DB:2.39:Call To Wtsqueryusertoken() Gives Error_Privilege_Not_Held fa

    Ok, the way I got this thing working is documented here: http://social.msdn.microsoft.com/forums/en-US/windowssecurity/thread/31bfa13d-982b-4b1a-bff3-2761ade5214f/I think the world is run by 'C' students. - Al McGuire

  • RELEVANCY SCORE 2.39

    DB:2.39:Directory.Exists() Returns Always False On Windows 7 When Its A Unc Path, But Not With A Backslash At The End Of The Path 9c


    Hi everybody,
    Is there a known bug on Windows 7 ? See what happend on this part of code :

    Directory.Exists(@\\ServerName\ServerShare) ; // returns false
    Directory.Exists(@\\ServerName\ServerShare\) ; // returns true

    DB:2.39:Directory.Exists() Returns Always False On Windows 7 When Its A Unc Path, But Not With A Backslash At The End Of The Path 9c

    As you said, I like that even less !

    The \ at the end trick works fine. I don't like this that much, but it's the best solution I found by now.Matteo, .NET Developer

  • RELEVANCY SCORE 2.39

    DB:2.39:Disable/Enable A Input Textfield sx



    Dear all,

    How do I disable and enable an input textfield?

    I have tried these but it returns me with error

    1119: Access of possibly undefined property editable through a reference with static type flash.text:TextField.

    mc_box.txt_input.editable = false;

    mc_box.txt_input.enabled = false;

    I have the input textfield inside a movieclip.

    I have already imported:

    import flash.text.TextField;

    DB:2.39:Disable/Enable A Input Textfield sx


    All good questions Jefferey... it becomes mostly a matter of intuition after you have banged your head against enough walls over time... you should talk to the guys there and see what they can do to alleviate things like this.

    I particularly like errors where you are cryptically told there is a problem with loading a file, but no indication of the file name is given... which has to be known by the software and would help solve the issue almost immediately in most cases.

    You should also start your own postings instead of piggy backing on someone else's, especially one that has been marked as answered... Not only do you have that working against you, but your name is shared by one of the employees that manages another forum and I ignored it for quite a while figuring it was just being moved from one forum to another by that person.

  • RELEVANCY SCORE 2.39

    DB:2.39:Find.Execute Returns True Even Though Search Criteria Is Not Met kp


    I created a macro in MS Word 2000. One of my users with MS Word 2007 experienced a problem with it. I debugged the issue and found that find.execute returned True even though the search criteria were not found. The code searches for italic and adds a
    comment if the underlying Style not not include italics.
    What happened between the versions? Is there a setting that I need to change? Is there a workaround?

    Private Function FindItalics() As Integer
    Dim oRange As Range
    Dim iComments As Integer
    On Error Resume Next
    iComments = 0
    Selection.HomeKey Unit:=wdStory
    Selection.Find.ClearFormatting
    Selection.Find.Font.Italic = True
    With Selection.Find
    .Text = ""
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindContinue
    .Format = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    End With
    ' Selection.HomeKey Unit:=wdStory
    While Selection.Find.Execute ' ReturnsTrue even when there is no match!

    sStyle = Selection.Range.Style
    Select Case ActiveDocument.Styles(sStyle).Font.Italic
    Case False
    ' Add a comment
    ActiveDocument.Comments.Add _
    Range:=Selection.Range, _
    Text:= _
    "Automated analysis: The text font is ITALICS, but the style (" sStyle ") font is not. This deviates from using only base style and is not acceptable."
    iComments = iComments + 1
    Selection.End = Selection.End + 2
    Selection.Start = Selection.End
    End Select
    Wend
    Set oRange = Nothing
    FindBoldOrItalics = iComments
    End Function

    DB:2.39:Find.Execute Returns True Even Though Search Criteria Is Not Met kp

    Thank you very much for the insight. I had failed to check the data type for the Italic property. I just assumed it would be a boolean or treated as a boolean.
    I took your drill down and modified it slightly to use the word style Italic value. Also, rather than flag each word, I check the sequence of words and tag offenders as one group.
    This still leaves the possibility of having individual characters devaite from the style, but it will get tagged as a word and isn't worth the bother of traversing all the characters.
    Dim oRange As Range
    Dim oParagraph As Paragraph
    Dim iWord As Long
    Dim oWord As Range
    Dim iFirstWord As Long
    Dim iLastWord As Long
    Dim iComments As Integer
    For Each oParagraph In ActiveDocument.Paragraphs
    If oParagraph.Style.Font.Italic oParagraph.Range.Font.Italic Then
    ' Found a mismatch
    If oParagraph.Range.Font.Italic = wdUndefined Then
    ' Mixed use in the paragraph - check individual words
    iFirstWord = 0
    iLastWord = 0
    For iWord = 1 To oParagraph.Range.Words.Count
    Set oWord = oParagraph.Range.Words(iWord)
    If oWord.Font.Italic oWord.Style.Font.Italic Then
    If iFirstWord = 0 Then
    iFirstWord = iWord
    Else
    iLastWord = iWord
    End If
    ElseIf iFirstWord 0 Then
    If iLastWord = 0 Then
    iLastWord = iFirstWord
    End If
    ' Add comment
    Set oRange = ActiveDocument.Range( _
    Start:=oParagraph.Range.Words(iFirstWord).Start, _
    End:=oParagraph.Range.Words(iLastWord).End _
    )
    ActiveDocument.Comments.Add _
    Range:=oRange, _
    Text:= _
    "Automated analysis: The text font is ITALICS, but the style (" oWord.Style ") font is not. This deviates from using only base style and is not acceptable."
    Set oRange = Nothing
    iFirstWord = 0
    iLastWord = 0
    End If
    Next iWord
    If iFirstWord 0 Then
    ' Add comment
    Set oRange = ActiveDocument.Range( _
    Start:=oParagraph.Range.Words(iFirstWord).Start, _
    End:=oParagraph.Range.Words(oParagraph.Range.Words.Count).End _
    )
    ActiveDocument.Comments.Add _
    Range:=oRange, _
    Text:= _
    "Automated analysis: The text font is ITALICS, but the style (" oWord.Style ") font is not. This deviates from using only base style and is not acceptable."
    Set oRange = Nothing
    End If
    Else
    ' Add comment
    ActiveDocument.Comments.Add _
    Range:=oParagraph.Range, _
    Text:= _
    "Automated analysis: The text font is ITALICS, but the style (" oParagraph.Style ") font is not. This deviates from using only base style and is not acceptable."
    End If
    End If
    If iComments MaxComments Then
    FindBoldOrItalics = iComments
    Exit Function
    End If
    Next oParagraph

  • RELEVANCY SCORE 2.39

    DB:2.39:Referenceerror: Error #1065: Variable Testmain Is Not Defined 8d



    I'm loading a .swf and trying to find a class based on an embedded xml document in it. I've looked this problem up endlessly and everyone has either said "Your class isn't public", "Your classname is interfering with your document class", or "You aren't using the same ApplicationDomain", none of which are true. Here's my code:

    In CoCMain.as, with a CoCMod.fla:

    private function pluginLoadingComplete(e:Event):void {
    var testXML:XML = new XML(new e.target.content.description);
    trace(e.target.applicationDomain.hasDefinition("blah.blaah.testPlugin.TestMain"));//returns false
    trace(ApplicationDomain.currentDomain.hasDefinition("blah.blaah.testPlugin.TestMain"));//returns false
    trace(testXML.main[0]);//returns blah.blaah.testPlugin.TestMain
    var pluginClass:Class = e.target.applicationDomain.getDefinition(testXML.main[0]) as Class;//error here
    }

    DB:2.39:Referenceerror: Error #1065: Variable Testmain Is Not Defined 8d


    copy and paste code where you add the listener that calls pluginLoadingComplete and the load method code.

    also, make sure your loaded swf is using TestMain in blah/blaah/testPlugin by using a trace statement in TestMain.

  • RELEVANCY SCORE 2.39

    DB:2.39:Wtsqueryusertoken For Session 0 In Windows Server 2003 ps


    I need to get user token forloggeduser,WTSQueryUserToken just work fine if first parameter is not zero(session ID is NOT 0).
    If it is 0, GetLastError return 1245. I am sure the user is already logged, but its session id is 0.
    So the function failed with 1245. System after Vista seem work fine, because all session id for logon user is start at 1.
    How could i deal with this issue in windows server 2003?

    DB:2.39:Wtsqueryusertoken For Session 0 In Windows Server 2003 ps

    The service is query too early, just wait for a few seconds, then query again, it will be ok.

  • RELEVANCY SCORE 2.39

    DB:2.39:Need Some Help0racle10g And Pl/Sql , Can Any One Help Me For This Questions 9j


    S 1.An Exit statement can only be used inside a PL/SQL loop.
    True
    False

    2.An inner loop can use a variable declared in the outer loop but the outer loop can not use variable declared in the inner loop.
    True
    False

    3.An implicit cursor is automatically associated (generated) with every DML statement.
    True
    False

    4. Main advantage of using an explicit cursor is that it allows you to process rows returned by SELECT statement, one row a a time.
    True
    False

    5.Once all of the rows in the cursor have been processed (retreived), the cursor should be closed. Otherwise, it will generate syntax error.
    True
    False

    6. A PL/SQL procedure can be created and stored in the database without execution of the code.
    True
    False

    7. PL/SQL functions returns a scalar value and PL/SQL procedures return nothing. Both can take zero or more number of parameters as input or output.
    True
    False

    8. A PL/SQL function can be called as part of a SQL expression or as part of a PL/SQL expression.

    True
    False

    9. In PL/SQL function, multiple RETURN statements are allowed, usually within an IF statement. Only one RETURN statement will be executed.
    True
    False

    10. The parameters of a function must be labeled IN or the function will not complete successfully.
    True
    False

    11. IN OUT paramenters are permissible in PL/SQL functions.
    True
    False

    12. PL/SQL package groups logically related program units like procedures and function.
    True
    False

    13. All procedures and functions in a package body must be declared in the package specification.
    True
    False

    14. A trigger is a PL/SQL block that executes implicitly whenever a particular event takes place.
    True
    False

    DB:2.39:Need Some Help0racle10g And Pl/Sql , Can Any One Help Me For This Questions 9j

    i think you did some good job , the answer are as followWhy did you asked questions if you have answers ?

    Nicolas.

  • RELEVANCY SCORE 2.39

    DB:2.39:Outlook Vba Code To Automate Word ca


    I created a macro in Word that would find a paragraph mark (^p) and replace with a semi-colon (;) in a 10 iteration loop, then copy the next from the top of the document to the last character before the next (11th) paragraph mark. When the macro runs, the
    immediate window shows that the Selection.Text property holds the text with the semi-colons inserted for paragraph marks.
    When I ported the code to Outlook VBA (and change the code to reference the Word object model), the code runs through completion, but the Application.ActiveWindow.Selection.Text returns the first letter in the document (or the first letter after the selected
    text.
    Why am I losing the selected text when I run this through Outlook? The code is below:

    Sub MakeItem()

    ' create the email attach the press release
    Set newItem = Application.CreateItemFromTemplate(c:\users\steve\appdata\roaming\microsoft\templates\press release - mesa investment consulting.oft)
    newItem.Attachments.Add C:\Users\Steve\Documents\MESA\Press Release\MESA Press Resease - FINAL 6-5-12.pdf

    ' open word
    On Error Resume Next
    fSuccess = True

    Set oWord = GetObject(Word.Application)
    If Err.Number 0 Then
    Err.Clear
    Set oWord = CreateObject(word.application)
    If Err.Number 0 Then
    MsgBox Could not open Word, vbCritical
    fSuccess = False
    Exit Sub
    End If
    End If

    ' open the address file, reformat and copy the text
    Set ODocument = GetObject(c:\users\steve\documents\mesa\press release\distribution 6-5-2012\managercontacts - working.csv)
    With oWord
    Dim i As Integer

    .Selection.Find.ClearFormatting
    .Selection.Find.Replacement.ClearFormatting
    With .Selection.Find
    .Text = ^p
    .Replacement.Text = ;
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    End With
    .Selection.Find.Execute
    With .Selection
    If .Find.Forward = True Then
    .Collapse Direction:=wdCollapseStart
    Else
    .Collapse Direction:=wdCollapseEnd
    End If
    .Find.Execute Replace:=wdReplaceOne
    If .Find.Forward = True Then
    .Collapse Direction:=wdCollapseEnd
    Else
    .Collapse Direction:=wdCollapseStart
    End If
    .Find.Execute
    End With

    For i = 1 To 10
    With .Selection
    If .Find.Forward = True Then
    .Collapse Direction:=wdCollapseStart
    Else
    .Collapse Direction:=wdCollapseEnd
    End If
    .Find.Execute Replace:=wdReplaceOne
    If .Find.Forward = True Then
    .Collapse Direction:=wdCollapseEnd
    Else
    .Collapse Direction:=wdCollapseStart
    End If
    .Find.Execute
    End With
    Next i

    .Selection.HomeKey Unit:=wdStory
    .Selection.Find.ClearFormatting

    With .Selection.Find
    .Text = ^p
    .Replacement.Text = ;
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    End With
    .Selection.Find.Execute
    .Selection.HomeKey Unit:=wdStory, Extend:=wdExtend
    .Selection.Copy
    MsgBox .Selection.Text

    End With

    newItem.BCC = ODocument.ActiveWindow.Selection.Text

    ODocument.ActiveWindow.Selection.Cut
    ODocument.ActiveWindow.Selection.Delete Unit:=wdCharacter, Count:=1

    newItem.Display
    Set newItem = Nothing
    End Sub
    steve

    DB:2.39:Outlook Vba Code To Automate Word ca

    if this is real csv file,, wouldn't it be easier to just manipualte it using FSO and string functions?

  • RELEVANCY SCORE 2.39

    DB:2.39:Using Named Ranges In Vba cs


    I am attempting to write code that will add a new worksheet to an existing file, import data from a text file, create a named range for the new data, and then add a vlookup formula that uses the newly created named range as the table array. When the new
    worksheet is inserted the name is defined by the value of an input box, and that name is also used for the named range. I have everything working correctly, except I cannot get the Vlookup formula to reference the named range correctly, the formula returns
    the #name? error. below is my code thus far:
    Sub ImportTextFile()
    'Showing Excel Open Dialog Form
    fname = Application.GetOpenFilename("Text Files (*.txt)," _
    "*.txt", 1, "Select Text File", "Open", False)
    'add and rename worksheet
    ActiveWorkbook.Worksheets.Add after:=ActiveSheet
    wrkshtname = InputBox("Name for new tab DO NOT USE SPACES", "Tab Name")
    ActiveSheet.Name = wrkshtname
    'import selected file
    With ActiveSheet.QueryTables.Add(Connection:="TEXT;" fname, Destination:=Range("$A$1"))
    .FieldNames = True
    .RowNumbers = False
    .FillAdjacentFormulas = False
    .PreserveFormatting = True
    .RefreshOnFileOpen = False
    .RefreshStyle = xlInsertDeleteCells
    .SavePassword = False
    .SaveData = True
    .AdjustColumnWidth = True
    .RefreshPeriod = 0
    .TextFilePromptOnRefresh = False
    .TextFilePlatform = 437
    .TextFileStartRow = 1
    .TextFileParseType = xlDelimited
    .TextFileTextQualifier = xlTextQualifierDoubleQuote
    .TextFileConsecutiveDelimiter = False
    .TextFileTabDelimiter = True
    .TextFileSemicolonDelimiter = False
    .TextFileCommaDelimiter = False
    .TextFileSpaceDelimiter = False
    .TextFileColumnDataTypes = Array(1, 1, 1)
    .TextFileTrailingMinusNumbers = True
    .Refresh BackgroundQuery:=False
    End With
    'name range
    Set rng1 = ActiveSheet.UsedRange
    ActiveWorkbook.Names.Add Name:=wrkshtname, RefersToR1C1:=rng1
    'navigate to previous sheet
    ActiveSheet.Previous.Select
    'Insert vlookup formula
    Range("B6").Select
    ActiveCell.FormulaR1C1 = "=PROPER(VLOOKUP(rc[-1],Range(wrkshtname),2,FALSE))"
    Range("O6").Select
    ActiveCell.FormulaR1C1 = "=VLOOKUP(rc[-14],Range(wrksheetname),3,FALSE)"
    End Sub
    Any help would be greatly appreciated, as I am out of ideas.

    DB:2.39:Using Named Ranges In Vba cs

    I see, the formulas are the same but I didn't put quote
    rng1.Name = "wrkshtname"

    If this answer solves your problem, please check, Mark as Answered. If this answer helps, please click the Vote as Helpful button. Cheers Shane Devenshire

  • RELEVANCY SCORE 2.39

    DB:2.39:Newbie Question About Comparing Strings fp


    I was messing about with a bit of code and realized that the top operation returns FALSE, while the next operation returns TRUE.

    String a = new String ("a");
    String b = new String ("a");
    System.out.println (a == b);

    String s1 = "yes";
    String s2 = "yes";
    System.out.println (s1 == s2)

    I would have expected BOTH to return FALSE. What is the difference between the two ways of creating a String?

    DB:2.39:Newbie Question About Comparing Strings fp

    884351 wrote:
    In the first operation you create 2 different String objects and the "==" operator looks only for the exact same string"If compares reference values.

    if you would compare the 1st operation with the equals() method you would get true as this method checks only if the value looks like the other value compared to and it doesn't need to be the exact same value."Looks like"? No. Strings equals() method does a character-by-character comparison.

    As in the 2nd operation you have created 2 String variables (not objects) which means both refer to the same String No. Having 2 String variables does not mean that both variables refer to the same String.

  • RELEVANCY SCORE 2.39

    DB:2.39:Vista Service Createprocessasuser Window Is Inactive Starts In Background. I Want It To Be Started In Foreground 3d


    I'm developing a service, which runs a process which should interact with an active user's desktop. The problem is that main window of just created process should be active. Running the service under win XP does the appropriate result, but running it under
    vista makes the window of just created process inactive. The code which creates a process in service is below:

    memset(StartupInfo, 0, sizeof (StartupInfo));

    StartupInfo.cb = sizeof (StartupInfo);
    StartupInfo.lpDesktop = "winsta0\\default" ;
    StartupInfo.dwFlags = STARTF_RUNFULLSCREEN | STARTF_USESHOWWINDOW;
    StartupInfo.wShowWindow = SW_SHOW;

    HANDLE hUserTokenDup;
    DWORD dSessId = WTSGetActiveConsoleSessionId();
    if (dSessId == 0xFFFFFFFF)
    throw CharException("%s" , "no session is currently attached to the console" );

    if (!WTSQueryUserToken(dSessId, hUserTokenDup))
    throw CharException("%s" , "can not query user token" );

    CreateProcessAsUser(hUserTokenDup, "C:\\test.exe" , 0, 0, 0, 0,
    CREATE_DEFAULT_ERROR_MODE | NORMAL_PRIORITY_CLASS, 0, "C:\\",
    StartupInfo, _process_information);

    if (!_process_information.hProcess)
    {
    CloseHandle(hUserTokenDup);
    throw
    CharException("%s" , TXT_CANNOT_CREATE_GAME_PROCESS);
    }

    CloseHandle(hUserTokenDup);
    code of test.exe can be any, for example, like below:

    HWND g_hwnd;

    DWORD WINAPI ThreadProc(LPVOID lpParameter)
    {
    Sleep(1000);
    //ShowWindow(g_hwnd, SW_SHOWNORMAL);

    //SwitchToThisWindow(g_hwnd, FALSE);

    //SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, (LPVOID)0, SPIF_SENDWININICHANGE | SPIF_UPDATEINIFILE);

    /*SetForegroundWindow(g_hwnd);
    BringWindowToTop(g_hwnd);
    if(!SetWindowPos(g_hwnd, HWND_TOP, 100, 100, 150, 150, SWP_ASYNCWINDOWPOS | SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW))
    {
    char s[234];
    itoa(GetLastError(), s, 10);
    MessageBox(g_hwnd, s, "asdf", MB_OK);
    }
    Beep(500, 1000);*/

    return 0;
    }

    BOOL CALLBACK DialogFun(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
    {
    switch
    (msg)
    {
    case WM_INITDIALOG:
    {
    g_hwnd = hwnd;
    CreateThread(NULL, 0, ThreadProc, NULL, 0, NULL);
    }
    break ;

    case WM_CLOSE:
    {
    EndDialog(hwnd, 0);
    }
    break ;
    }

    return FALSE;
    }

    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
    int
    nCmdShow)
    {
    DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), NULL, DialogFun);

    return 0;
    }
    the problem is that all lines that are commented in ThreadProc function does no result to activation of the window.

    The problem becomes even worse when just created process is DirectX full-screen application. In that case all the desktop are like "behind the process' window" and when I move mouse cursor over the very bottom line I can see the task-bar blinking over my just
    created full screen window. It stops blinking only when I make left click on some area which belongs to just created window (in this case it becomes active and everything goes fine).

    The question is: how can I make a window of just created process active either from the service or from just created application?

  • RELEVANCY SCORE 2.38

    DB:2.38:Javaaccessbridge Settextcontents Returns False kz


    From a C# program, I can read the text in Java textboxes (JTextArea, JTextField, TextArea). These texts are editable. When I call the setTextContents function, it always returns false; no error happens, Marshal.GetLastWin32Error() returns 0. How can the problem be resolved?

    Some code snippets used on my Win7 64bit machine (my application is running as a 32bit application, and the Java program was started with the 32bit java.exe):
    [DllImport(WinAccessBridgeDll, SetLastError = true, ThrowOnUnmappableChar = true, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
    public extern static unsafe Boolean setTextContents(Int32 vmID, Int64 AccessibleContext, string text);
    It does not matter which CharSet I use (tested all 4 available types).

    The context in which the function is called is:
    AccessibleTextItemsInfo textInfo = GetAccessibleTextItemsInfo(vmID, textbox, 0);
    MessageBox.Show("Der gegenwrtige Text lautet:\r\n" + textInfo.sentence);
    string replacement = "Laber laber blah blah!";
    if (!WABAPI.setTextContents(vmID, textbox.accessibleContext, replacement))
    {
    int errorCode = Marshal.GetLastWin32Error();
    MessageBox.Show(string.Format("ndern des Textes fehlgeschlagen mit code = {0}!", errorCode));
    }

    DB:2.38:Javaaccessbridge Settextcontents Returns False kz

    From a C# program, I can read the text in Java textboxes (JTextArea, JTextField, TextArea). These texts are editable. When I call the setTextContents function, it always returns false; no error happens, Marshal.GetLastWin32Error() returns 0. How can the problem be resolved?

    Some code snippets used on my Win7 64bit machine (my application is running as a 32bit application, and the Java program was started with the 32bit java.exe):
    [DllImport(WinAccessBridgeDll, SetLastError = true, ThrowOnUnmappableChar = true, CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
    public extern static unsafe Boolean setTextContents(Int32 vmID, Int64 AccessibleContext, string text);
    It does not matter which CharSet I use (tested all 4 available types).

    The context in which the function is called is:
    AccessibleTextItemsInfo textInfo = GetAccessibleTextItemsInfo(vmID, textbox, 0);
    MessageBox.Show("Der gegenwrtige Text lautet:\r\n" + textInfo.sentence);
    string replacement = "Laber laber blah blah!";
    if (!WABAPI.setTextContents(vmID, textbox.accessibleContext, replacement))
    {
    int errorCode = Marshal.GetLastWin32Error();
    MessageBox.Show(string.Format("ndern des Textes fehlgeschlagen mit code = {0}!", errorCode));
    }

  • RELEVANCY SCORE 2.38

    DB:2.38:My Generic Array Creation Problem. ka


    I'm getting a "generic array creation" error on lines 6 and 14. I've googled it and I'm still having a hard time. Most things I find on it are pretty complicated and as you can see mine's not, I'm in a beginners course. I'm basically writing a class with methods for dealing with a file of donors.

    Here's my code:

    public class DonorList dlist
    {
    //Create empty list
    public DonorList()
    {
    storage = new dlist [MAX];
    count = 0;
    }

    //Capacity as specified
    public DonorList (int cap)
    {
    MAX = cap;
    storage = new dlist [MAX];
    count = 0;
    }

    public boolean isEmpty()
    {
    return count == 0;
    }

    public void clear()
    {
    count = 0;
    }

    //Returns number of elements
    public int size()
    {
    return count;
    }

    //Item at position k, position starts at zero
    public dlist get (int k)
    {
    if (k = 0 k count)
    return storage [k];
    return null;
    }

    // e becomes item at position k
    public dlist set (int k, dlist e)
    {
    dlist old = null;
    if (k 0 k count)
    {
    old = storage [k];
    storage [k] = e;
    }
    return false;
    }

    //Returns the position of e or -1 if not found.
    public int indexOf (dlist e)
    {
    int k;
    for (k = 0; k count; k++)
    {
    if (e.equals(storage[k]))
    return k;
    }
    return -1;
    }

    //Appends e at the end of the list. Returns false on failure.
    public boolean append (dlist e)
    {
    if (count MAX)
    {
    storage [count] = e;
    count ++;
    return true;
    }
    return false;
    }

    //Adds e at position k. Returns false on failure.
    public boolean add (int k, dlist e)
    {
    int j;
    if (count == MAX || k 0 || k count)
    return false;
    for ( j = count; j k; j--)
    {
    storage [j] = storage [j-1];
    storage [k] = e;
    count ++;
    return true;
    }
    return false;
    }

    private int MAX = 100;
    private dlist [] storage;
    private int count;
    }Any help as to why I am getting these errors is very much appreciated. Thanks.

    DB:2.38:My Generic Array Creation Problem. ka

    You cannot create an array of a generic, instead you need to create an array of the class the generic extends (in this case Object)
    You then have to cast the array to the generic type which will give you an unchecked warning which you can turn off with @SuppressWarning("unchecked") on the class.
    Generics and arrays don't always play nicely together and this is one case. ;-)

  • RELEVANCY SCORE 2.38

    DB:2.38:Cordova 3.5 File Api Error On First Launch 8z



    Hi there,

    I have a WebWorks app running Cordova 3.5 with the File plugin, and I build and install the app to my Z10 using the BlackBerry 10 WebWorks SDK.

    When the app launches for the first time, the File API returns an error for both reading and writing:

    {"type":"error","bubbles":false,"cancelBubble":fal​se,"cancelable":false,"lengthComputable":false,"lo​aded":0,"total":0,"target":{"fileName":"","length"​:0,"localURL":"file:///accounts/1000/appdata/path to file/data/webviews/webfs/persistent/local__0/fil​e name","position":0,"readyState":2,"result":null,"​error":{"code":{"lengthComputable":true,"loaded":0​,"total":26448,"returnValue":true,"timeStamp":1404​689605867,"eventPhase":2,"target":{"readyState":2,​"length":0,"onwrite":null,"onabort":null,"error":{​"code":10},"onprogress":null,"position":0,"onwrite​start":null},"defaultPrevented":false,"srcElement"​:{"readyState":2,"length":0,"onwrite":null,"onabor​t":null,"error":{"code":10},"onprogress":null,"pos​ition":0,"onwritestart":null},"type":"error","canc​elable":true,"currentTarget":{"readyState":2,"leng​th":0,"onwrite":null,"onabort":null,"error":{"code​":10},"onprogress":null,"position":0,"onwritestart​":null},"bubbles":false,"cancelBubble":false}},"on​writestart":null,"onprogress":null,"onwrite":null,​"onabort":null}}

    But if I restart the app and do the same thing, I was able to read/write files successfully.

    I also tested the Cordova app on Android and the first launch errors for file read/write did not occur.

    I wasn't sure if this is a bug specific to the Cordova 3.5 File API for BB10. Did anyone else have similar issues?







    Solved!
    Go to Solution.

    DB:2.38:Cordova 3.5 File Api Error On First Launch 8z


    There was another unrelated issue on the master branch that might be the cause of the trouble you had.

    It is fixed as well now, so you might want to pick it up and re-test.




    Bryan HigginsBlackBerry WebWorks@bryanhiggins

  • RELEVANCY SCORE 2.38

    DB:2.38:Unable To Find A Code In Excel Using C# a7


    I want to find a code in an Excel sheet using C#.

    rg = this.objSheetN.get_Range(B5:B100);
    Range
    reg2 = rg.Find(A_Q 01-99, Type.Missing, XlFindLookIn.xlValues, XlLookAt.xlWhole, XlSearchOrder.xlByRows, XlSearchDirection.xlNext, false, false);
    A_Q 01-99 is in the range rg but the find returns always null
    I tried with another code without spaces in it and this code was found
    How can I bypass this problem?

    DB:2.38:Unable To Find A Code In Excel Using C# a7

    Also tested in C# and same results: code works as expected.

    try
    {
    Debug.Print(*** Testing in C# ***);

    Excel.Worksheet dataWks;
    dataWks = (Excel.Worksheet)Application.ActiveWorkbook.Worksheets[1];

    Excel.Range rangeSearched;
    rangeSearched = dataWks.get_Range(B5, B100);

    string textSought;
    textSought= A_Q 01-99;

    Excel.Range rangeSought;
    rangeSought = rangeSearched.Find(textSought,
    missing,
    Excel.XlFindLookIn.xlValues,
    Excel.XlLookAt.xlWhole,
    Excel.XlSearchOrder.xlByRows,
    Excel.XlSearchDirection.xlNext,
    false, false, missing);

    if (rangeSought ==null)
    {
    Debug.Print(text {0} not found!, textSought);
    }
    else
    {
    string address;
    address = rangeSought.get_Address(true,
    true,
    Excel.XlReferenceStyle.xlA1,
    false,
    missing);
    Debug.Print(text {0} found in cell {1}, textSought, address);

    }
    }
    catch (Exception ex)
    {
    Debug.Print(ex.Message);
    }

  • RELEVANCY SCORE 2.38

    DB:2.38:Problem With Error Code 800700003 Re Kb2267602 a8


    Windows 8 update KB2267602 for Windows Defender returns error code 800700003.

    DB:2.38:Problem With Error Code 800700003 Re Kb2267602 a8

    http://windows.microsoft.com/en-US/windows-vista/Windows-Update-error-80070003

    -steve

  • RELEVANCY SCORE 2.38

    DB:2.38:Agent Install Failing pz


    I have installed the Oracle Enterprise Manager Control Grid on RHEL 5 with Oracle DB 10g R2 (10.2.0.4). I am getting below error while trying to install agent from the Control Grid.

    Error while running prerequisite checks. See the log files $OMS_HOME/sysman/prov/agentpush/remoteInterfacesTIME_STAMP.log for more details.

    There are no error messages in the remoteInterfacesTIME_STAMP.log but i do see below stack trace in the EMAgentPush2011-11-09_07-41-37-PM.log.

    INFO: BASIC PREREQ FAILURE : Unknown reason, runInstaller itself might have failed...
    INFO: BaseServiceHandler.process Action code: 41
    INFO: BasicPrereqsValidator.validate : got uierror bean as - ERROR = error nextURI = BaseServiceHandler?ACTION_CODE=44ACTION=1 systemHomeDir = as calculated by application error = true pwdPromptString = srcShiphomeLocation = false srcShiphomeLocationErrorBinding = null remoteHostNames = false remoteHostNamesErrorBinding = null clusterNodes = false clusterNodesHasSpace = false clusterNodesErrorBinding = null username = false usernameErrorBinding = null pwdNoMatch = false pwdNoMatchErrorBinding = null installBaseDir = false installBaseDirErrorBinding = null installBaseDirHasSpace = false installBaseDirHasSpaceErrorBinding = null omsPasswordErrorBinding = null confirmOmsPasswordErrorBinding = null omsPwdNoMatch = false omsPwdNoMatchErrorBinding = null oldAgentHome = false oldAgentHomeErrorBinding = null oldAgentHomeHasSpace = false oldAgentHomeHasSpaceErrorBinding = null nfsAgentLoc = false nfsAgentLocErrorBinding = null nfsAgentLocHasSpace = false nfsAgentLocHasSpaceErrorBinding = nullstateDir = falsestateDirErrorBinding = nullstateDirHasSpace = falsestateDirHasSpaceErrorBinding = nullnoShiphomeExists = falsenoShiphomeExistsErrorBinding = nullport = falseportNull = falseportNullErrorBinding = nullportErrorBinding = nullincorrectClusterNode = falseincorrectClusterNodeErrorBinding = nullincorrectClusterNodeName = falseinvalidRemoteHostNames = falseinvalidRemoteHostNamesErrorBinding = nullinstallationDirNonWritable = false failedNodesConnectivity = sshUEFailed = false sshServerFailed = false sudoNotAvailable = false sudoPathIncorrect = false sudoPathIncorrectNodes = false sudoFileName = false localTempPathNotWritable = false remoteTempPathNotWritable = false localTempPathErrorMessage = null remoteTempPathErrorMessage = null installBaseDirNotValidUnixName = false stateDirNotValidUnixName = false installBaseDirNotValidNTName = false stateDirNotValidNTName = false installBaseDirNotAbsolute = false stateDirNotAbsolute = false CCRServer = false CCRPort = false CCRPassword = false CCRUsername = false CCRMLName = false CCRCSI = false CCRAuthName = false nfsPortValidationFailed = false tmpNotExistFailed = false foundNodesAliveException = false foundConnectionSetupException = false foundFileLockException = false foundFileLockCreateException = false lockFile = unknownConnectionSetupError = false isSSHSetupPrereqError = false isSSHSetupDisabledAndSSHError = false isCygwinPathError = false downNodes = sshServerDownNodes = sshSetupFailedNodes = sshSetupPrereqError = sshLogFile = localPathCheckFailed = false remotePathCheckFailed = false platformIDMismatch = false noAgentDownloadRspExists = false agentDownloadRspBakExists = false copyRspBakToRspFailed = false copyRspBakToRspFailedReason = null platformName = null platformID = null agentDownloadRspDir = null selPlatformName = null productsXmlInvalid = false noProductsXmlExists = false remotePathCheckUIErrMsg = null remotePathCheckUIFailed = false unknownError = true pingNotSticky = false pingUnavailable = false bannerCheckFailed: false bannerUIErrMsg: null localPathCheckUIFailed: false localPathCheckUIErrMsg: null noAgentDownloadRspandBakExists: false pathPropertiesNotValid: false invalidPathPropertiesFile: null
    INFO: Exception : [Message:] null [Exception:] oracle.sysman.prov.agentpush.ui.validate.ValidationException
    at oracle.sysman.prov.agentpush.ui.validate.prereq.BasicPrereqsValidator.validate(BasicPrereqsValidator.java:64)
    at oracle.sysman.prov.agentpush.services.BaseServiceHandler.process(BaseServiceHandler.java:200)
    at oracle.sysman.prov.agentpush.services.BaseServiceHandler.doGet(BaseServiceHandler.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.prov.agentpush.services.AgentpushAuthFilter.doFilter(AgentpushAuthFilter.java:122)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:311)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilter.java:41)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:502)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

    DB:2.38:Agent Install Failing pz

    Is your gridcontrol functioning ok?

    From the OMS server, are you able to ping the agent server?

  • RELEVANCY SCORE 2.38

    DB:2.38:Error In Code Compiling ss


    Hi this is the error i am getting while compiling
    C:\javac SessionListener.java
    SessionListener.java:17: identifier expected
    private static MapString,HttpSession sessionMX = new HashMapString,HttpSe
    ssion();
    ^
    SessionListener.java:60: identifier expected
    public static SetString getActiveSessionids(){
    ^
    SessionListener.java:118: ';' expected

    ^
    3 errorsthis is the code which i am compiling so can you suggest me something....
    thanks in advance

    package com.listeners;
    import java.util.Map;
    import java.util.HashMap;
    import java.util.Collections;
    import java.util.Set;
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpSessionListener;
    import javax.servlet.http.HttpSessionEvent;

    public class SessionListener implements HttpSessionListener{


    /*Usage of a Static Collection Object is what the other Poster is talking about*/
    private static MapString,HttpSession sessionMX = new HashMapString,HttpSession();



    /*Called @time when a new session is created */
    public void sessionCreated(HttpSessionEvent se){



    HttpSession session = se.getSession();
    sessionMX.put(session.getId(),session);

    }


    /*Called @time when an existing session is being destroyed */
    public void sessionDestroyed(HttpSessionEvent se){

    HttpSession session = se.getSession();
    sessionMX.remove(session.getId());

    }



    /* Utility Methods */


    /**
    * Returns number os active sessions
    *
    **/
    public static int getNoActiveSessions(){

    return sessionMX.size();

    }


    /**
    * Returns a Set of Active SessionIds
    *
    **/
    public static SetString getActiveSessionids(){

    return sessionMX.keySet();

    }



    /**
    * Returns whether there is any Active Session or not
    *
    **/

    public static boolean isActive(String sessionId){

    return sessionMX.containsKey(sessionId);

    }



    /**
    * Returns associated session for specified sessionID
    * if not found returns 'null'
    *
    **/

    public static HttpSession getAssociatedSession(String sessionId){

    HttpSession session = null;

    if(isActive(sessionId))
    session = sessionMX.get(sessionId);

    return session;
    }


    /**
    * Invalidates the specified session with consequent sessionID
    * returns true if succeful else returns false
    *
    **/

    public static boolean force2Invalidate(String sessionId){

    boolean flag = false;

    if(isActive(sessionId)){

    sessionMX.get(sessionId).invalidate();
    flag = true;

    }

    return flag;

    }




    }

    DB:2.38:Error In Code Compiling ss

    What version of the javac compiler are you using? To use generics it needs to be 1.5 or later

  • RELEVANCY SCORE 2.38

    DB:2.38:Fms 3 - Stream.Play() For Recorded Stream Returns False kk


    I have a custom app and when trying to playback a recorded
    stream using the Stream.play(streamName, startOffset, -1), the
    result returned is always false, below is some sample codes:
    flvPlay = Stream.get("myFLVSession");
    flvPlay.onStatus = function(info){
    trace(" Status code: " + info.code + " Level: " +
    info.level + " Stream: " +info.details);
    };
    stat = flvPlay.play("myFLV", startOffset, -1);

    When I prints out stat, it returns false, and the status
    callback will print:
    Status code: NetStream.Play.Failed Level: error Stream:
    undefined

    Even if I try flvPlay.play("myFLV");, the return status is
    still false. However, the video will be able to continue playing,
    anyone face similar problem before?

    The same application runs in FMS 2 with return status=true,
    but not in FMS 3, though the playback still can proceed, but it
    won't start at the offset I specified, and since the return status
    is false, why can the playback still proceed?

    Thanks in advance for any pointer on this.

    DB:2.38:Fms 3 - Stream.Play() For Recorded Stream Returns False kk

    I have a custom app and when trying to playback a recorded
    stream using the Stream.play(streamName, startOffset, -1), the
    result returned is always false, below is some sample codes:
    flvPlay = Stream.get("myFLVSession");
    flvPlay.onStatus = function(info){
    trace(" Status code: " + info.code + " Level: " +
    info.level + " Stream: " +info.details);
    };
    stat = flvPlay.play("myFLV", startOffset, -1);

    When I prints out stat, it returns false, and the status
    callback will print:
    Status code: NetStream.Play.Failed Level: error Stream:
    undefined

    Even if I try flvPlay.play("myFLV");, the return status is
    still false. However, the video will be able to continue playing,
    anyone face similar problem before?

    The same application runs in FMS 2 with return status=true,
    but not in FMS 3, though the playback still can proceed, but it
    won't start at the offset I specified, and since the return status
    is false, why can the playback still proceed?

    Thanks in advance for any pointer on this.

  • RELEVANCY SCORE 2.38

    DB:2.38:Opatch Returns With Error Code = 170 md


    Performing Critical Patch Update (April 2007), attempting to run opatch apply when the following error is encountered:

    "OPatch returns with error code = 170"

    Note: Directory is a number

    DB:2.38:Opatch Returns With Error Code = 170 md

    You don't tell us the OS (it's always a good idea to do this), but in case of Windows most likely patch directory is wrong, it should look like

    Drive:\patches\ppatchnumber_releasenumber_WINNT\patchnumber\patchnumber

    Note patchnumber occurs twice at the end.

    Werner

  • RELEVANCY SCORE 2.38

    DB:2.38:Display Error Message When A Condition In Page Process Returns False x9


    Hi,

    I have one doubt in displaying error message in a page.In my page processing i have a process which is assosiated with

    a button press.In the process i have an 'if' condition and insert into a table when the 'if' condition returns true. If

    it returns false i need to display an error message like "Can not insert value".I tried to give it in the process error

    message, but it is not getting displayed when the if condition fails.Please help,

    Thanks,

    tj

    Edited by: tj2010 on Sep 6, 2009 9:25 PM

    DB:2.38:Display Error Message When A Condition In Page Process Returns False x9

    Hi,

    Have you tried

    If condition = true
    then
    insert into table;
    else
    apex_application.g_print_success_message := 'Your Message Here';
    end if;

    Make sure the branch on the page that is fired after your process has the 'include process success message' checked.

    Regards

    Paul

  • RELEVANCY SCORE 2.38

    DB:2.38:Error Handling While Calling A Managed Exe From Unmanaged Code zz


    Hi All,I am trying to call managed exe from unmanaged exe.  I use CreateProcess to do that. The Managed exe needs CLR 2 (Its build with VS2008). The unmanaged exe is buit with VS2003. Everything works fine when CLR 2 is insalled but when CLR 2 is not installed and a lower version of CLR (1.1) is installed , The managed exe can not be run, thats fine its excepted but CreateProcess does return true and there is no way to find that process will not start.  I even tried to read the input./output stream of the called process but nothing is returned there. But when the unmanaged code is also complied with VS2008 then CreateProcess returns FALSE and GetLastError() returns error code.Please help.Rajan

    DB:2.38:Error Handling While Calling A Managed Exe From Unmanaged Code zz

    Hi hg,Thanks for your replay. We do have a similar mechanism, when the launched process starts first thing it does is , it writes a string in error stream indicating that it has started successfully. The launcher process waits on the error stream and continues only after getting an incitation. In this case (No CLR/Lower CLR) the launcher can not read the error stream (obviously) which is a kind of indication that target process is not started. But its not an clear indication that it has not started because of No CLR or Lower version of CLR. I am trying to distinguish between CLR error and any other error, so that I can give more meaning full message instead of giving a general message that the target process has failed for some reason.Regards,Rajan

  • RELEVANCY SCORE 2.37

    DB:2.37:Return Value Of Getint On Callablestatement 3s


    I am calling a stored procedure which returns an integer.
    One of the "VALID" values the stored procedure returns is 0.
    below is the snippet of code.......
    CallableStatement cst;
    cst = con.prepareCall("{?=call set_status(?,?,?,?)}");
    cst.registerOutParameter(1,Types.INTEGER);
    cst.setString(2,ri);cst.setString(3,cal);cst.setString(4,st);cst.setString(5,logonId);cst.execute();
    int result = cst.getInt(1);

    ...Below is the description for the getInt() method

    getInt
    public int getInt(int parameterIndex)
    throws SQLException
    Gets the value of a JDBC INTEGER parameter as an int in the Java programming language.
    Parameters:
    parameterIndex - the first parameter is 1, the second is 2, and so on
    Returns:
    the parameter value. If the value is SQL NULL, the result is 0.
    Throws:
    SQLException - if a database access error occurs

    My question is:
    If the getInt returns 0 for a SQL NULL, how do we differentiate between the actual 0 the procedure is returning and the 0 which is meant to be a null.
    The same is the case with getBoolean() which returns a false for SQL NULL. So how do we differentiate between the false which the procedure is returning and the false which meant to be a SQL NULL....
    I appreciate any help.
    Thanks,

    DB:2.37:Return Value Of Getint On Callablestatement 3s

    If the procedure intended to return a NULL, since it has to
    return an int, it converts NULL to 0 and returns.So you intend for your function to return null.

    You can try wasNull().

    Or getObject() instead of getInt(). It should return a null or a Integer (although you would want to test that.)

  • RELEVANCY SCORE 2.37

    DB:2.37:Determine The Current Active Session Of User In Windows Server 2008 d8


    Hi,
    I have an requirement of invoking a batch file through terminal services.
    I have used CreateProcessAsUSer API to invoke an batch from service.

    This method used to work fine in WindowsXP. To make it work for Windows Vista and Windows 7

    operating system as sessionid is different for applications and services I was forced to add below code to get the token associated with the sessionid related to user.

    DWORD dwSessionid = GetActiveSessionId();

    //get Active UI session
    bRet = WTSQueryUserToken (dwSessionid, hTokenthis);

    if (!LookupPrivilegeValue(NULL,SE_DEBUG_NAME,luid))
    {
    printf(Lookup Privilege value Error: %u\n,GetLastError());
    }
    tp.PrivilegeCount =1;
    tp.Privileges[0].Luid =luid;
    tp.Privileges[0].Attributes =SE_PRIVILEGE_ENABLED;

    bRet = false;
    bRet = DuplicateTokenEx(hTokenthis, MAXIMUM_ALLOWED,NULL, SecurityIdentification, TokenPrimary, htoken);

    //Adjust Token privilege
    SetTokenInformation(hTokenthis,TokenSessionId,(void*)dwSessionid,sizeof(DWORD));

    if (!AdjustTokenPrivileges(hTokenthis,FALSE,tp,sizeof(TOKEN_PRIVILEGES),(PTOKEN_PRIVILEGES)NULL,NULL))
    {
    int abc =GetLastError();
    printf(Adjust Privilege value Error: %u\n,GetLastError());

    }

    if (GetLastError()== ERROR_NOT_ALL_ASSIGNED)
    {
    printf(Token does not have the provilege\n);
    }

    LPVOID pEnv =NULL;

    if(CreateEnvironmentBlock(pEnv,hUserTokenDup,TRUE))
    {
    dwCreationFlags|=CREATE_UNICODE_ENVIRONMENT;
    }
    else
    pEnv=NULL;

    -----------------------------------

    Call CreateProcessAsUser
    -----------------------------------

    //Definition of GetActiveSessionId
    DWORD GetActiveSessionId()
    {
    PHANDLE currentToken = 0;
    PHANDLE primaryToken = 0;

    int dwSessionId = 0;
    PHANDLE hUserToken = 0;
    PHANDLE hTokenDup = 0;

    PWTS_SESSION_INFO pSessionInfo = 0;
    DWORD dwCount = 0;

    WTSEnumerateSessions(WTS_CURRENT_SERVER_HANDLE, 0, 1, pSessionInfo, dwCount);

    int dataSize = sizeof(WTS_SESSION_INFO);

    for (DWORD i = 0; i dwCount; i)
    {
    WTS_SESSION_INFO si = pSessionInfo[i];
    if (WTSActive == si.State)
    {
    dwSessionId = si.SessionId;
    break;
    }
    }

    return dwSessionId;
    }

    After adding the above code, my code works for XP, Vista and Windows 7. BUT, Windows Server 2008
    can have more than one active sessions at a time and it also allows the same user to login from machines. For ex: Server 2008 allows the user Administrator to login to in x machine and with the same user Administrator server 2008 allows to login from y
    machine. Therefore there can be more than one active sessions from same/different users.

    Is there any way to determine the current Active session of user?

    DB:2.37:Determine The Current Active Session Of User In Windows Server 2008 d8

    On client systems, you can only have a single Active Session. This isn't the case for a Server system so it is not clear where you need to run the batch file. You would need to determine which session you want to run the batch file on.
    thanks
    Frank K [MSFT]
    Follow us on Twitter, www.twitter.com/WindowsSDK

  • RELEVANCY SCORE 2.37

    DB:2.37:Regarding Error 1307 With Settokeninformation() (While Setting Token_Owner) 38



    Hi All,

    I get the error no.
    1307 (This security ID may not be assigned as the owner of this object) while setting up
    TokenOwner information using SetTokenInformation().

    Background:

    I want to impersonate a client user from a
    Service (running in Server). The users are configured using Active Directory/domain controller. The
    Service will run on the same system as the AD/domain controller system is. The
    Service will be executed in SYSTEM account.

    After going through several forums and MSDN, Im following the below approach for the impersonation:

    [Steps that are part of Service]
    1.
    Get the SID of the client user
    2.
    Create a client context from the SID (using AuthzInitializeContextFromSid())
    3.
    Get
    TOKEN_GROUPS (say pTokenGroup) from the SID (using AuthzGetInformationFromContext())
    4.
    Get
    TOKEN_PRIVILEGES (say pTokenPrivileges) from the SID (using AuthzGetInformationFromContext())
    5.
    dwSessionID = WTSGetActiveConsoleSessionId()
    6.
    WTSQueryUserToken(dwSessionID, hLocalUserToken)
    7.
    DuplicateTokenEx(hLocalUserToken, MAXIMUM_ALLOWED, 0, SecurityImpersonation, TokenPrimary, hDuplicateToken)
    8.
    AdjustTokenGroups(hDuplicateToken, FALSE, pTokenGroup, 0, 0, 0)
    9.
    AdjustTokenPrivileges(hDuplicateToken, FALSE, pTokenPrivileges, 0, 0, 0)
    10.
    pTokenOwner-Owner = SID of the client user
    11.
    SetTokenInformation(hDuplicateToken, TokenOwner, pTokenOwner, sizeof(TOKEN_OWNER))
    12.
    ImpersonateLoggedOnUser(hDuplicateToken)
    13.
    do some operation
    14.
    RevertToSelf()

    Now, at step 11, the SetTokenInformation() throws the error
    1307. I have enabled necessary privileges (such as SeTakeOwnershipPrivilege, SeImpersonatePrivilege etc. for all the accounts for debugging purpose).

    The target OS platform on Server is Windows Server 2008 and clients running Windows 7.

    Can anybody help in finding solution?

    Also, I like to know if there is any better approach for impersonation (except
    SSPI).

    Thanks,
    Shreerama

    DB:2.37:Regarding Error 1307 With Settokeninformation() (While Setting Token_Owner) 38


    Hi All,

    I get the error no.
    1307 (This security ID may not be assigned as the owner of this object) while setting up
    TokenOwner information using SetTokenInformation().

    Background:

    I want to impersonate a client user from a
    Service (running in Server). The users are configured using Active Directory/domain controller. The
    Service will run on the same system as the AD/domain controller system is. The
    Service will be executed in SYSTEM account.

    After going through several forums and MSDN, Im following the below approach for the impersonation:

    [Steps that are part of Service]
    1.
    Get the SID of the client user
    2.
    Create a client context from the SID (using AuthzInitializeContextFromSid())
    3.
    Get
    TOKEN_GROUPS (say pTokenGroup) from the SID (using AuthzGetInformationFromContext())
    4.
    Get
    TOKEN_PRIVILEGES (say pTokenPrivileges) from the SID (using AuthzGetInformationFromContext())
    5.
    dwSessionID = WTSGetActiveConsoleSessionId()
    6.
    WTSQueryUserToken(dwSessionID, hLocalUserToken)
    7.
    DuplicateTokenEx(hLocalUserToken, MAXIMUM_ALLOWED, 0, SecurityImpersonation, TokenPrimary, hDuplicateToken)
    8.
    AdjustTokenGroups(hDuplicateToken, FALSE, pTokenGroup, 0, 0, 0)
    9.
    AdjustTokenPrivileges(hDuplicateToken, FALSE, pTokenPrivileges, 0, 0, 0)
    10.
    pTokenOwner-Owner = SID of the client user
    11.
    SetTokenInformation(hDuplicateToken, TokenOwner, pTokenOwner, sizeof(TOKEN_OWNER))
    12.
    ImpersonateLoggedOnUser(hDuplicateToken)
    13.
    do some operation
    14.
    RevertToSelf()

    Now, at step 11, the SetTokenInformation() throws the error
    1307. I have enabled necessary privileges (such as SeTakeOwnershipPrivilege, SeImpersonatePrivilege etc. for all the accounts for debugging purpose).

    The target OS platform on Server is Windows Server 2008 and clients running Windows 7.

    Can anybody help in finding solution?

    Also, I like to know if there is any better approach for impersonation (except
    SSPI).

    Thanks,
    Shreerama

  • RELEVANCY SCORE 2.37

    DB:2.37:Addpicture Method Fails With A .Docx Document In Word 2007 c8


    Here is a snipet of the code that fails:
    (This is a Visual Basic.net addin for Microsoft Word)
    Dim TextBox As Word.Shape
                TextBox = app.Selection.HeaderFooter.Shapes.AddPicture(sLogo, False, True, nHPos, nVPos, nWidth, nHeight)
    This line of code consistently fails and returns an Unspecified Error (ErrorCode -2147467259)
    This error happens consistently when trying to add a picture to Word 2007's default file type (.docx) but if you save the file into compatability mode (.doc) everything works just fine.
     
    Any ideas on how to resolve?
     
    Thanks in advance,
    Marcus

    DB:2.37:Addpicture Method Fails With A .Docx Document In Word 2007 c8

    Majella:
     
    Please show us the code you tried and specify the version of Word you're working with.
     

  • RELEVANCY SCORE 2.37

    DB:2.37:Error C2664: _Com_Ptr_T_Com_Iiidxml::Ixmldomnode, _Guid_2933bf80_7b36_11d2_B20e_00c04f983e60::_Com_Ptr_T(Lpcstr,Iunknown *,Dword) : Cannot Convert Argument 1 From Atl::Ccomptriinterface To Int_ kp


    Hii
    I am migrating my application from vc 0.6 to vc2013, one of the error i am facing is given above,
    I am sending th epart of my code with the error line highlighted
    ==================CODE======================
    // Get first child of m_spXMLNode which represents a record. This should be all elements without text child
    // @returns true if a child is found, otherwise false.
    bool CXMLHelper::GetFirstSubRecord()
    {
    bool bFound = false;

    if ( m_spXMLNode == NULL ) return false;
    if ( VARIANT_TRUE == m_spXMLNode-hasChildNodes() )
    {
    typedef object_iteratorXML::IXMLDOMNode iterator;
    for ( iterator oIte(m_spXMLNode-childNodes); oIte != iterator(); oIte )
    {
    XML::IXMLDOMNodePtr spNode(*oIte); // error line
    if ( spNode-hasChildNodes() !CXMLHelper::HasTextChild(spNode) )
    {
    // We have found a node whithout text == this is a subrecord
    m_spXMLNode = spNode;
    bFound = true;
    break; // leave loop
    }
    }
    }
    return bFound;
    }
    ==========================CODE=======================
    Please can anyone help me get through this??
    Thanks Ankush

  • RELEVANCY SCORE 2.37

    DB:2.37:Oim Api jj


    Through OIM API's check that is the request pending with the User's manager. This adapter returns true or false. For False, need to add an error handler task.Any Sample Code ?

    thanks

    DB:2.37:Oim Api jj

    Thanks,but I am looking for the code in which once the request is submitted by the user, it is editable by manager and no one after that like higher manager or other level 3 and level 4 in the workflow.

    Thanks

  • RELEVANCY SCORE 2.37

    DB:2.37:Weired Sqlcommand.Executereader Error. Need Help Asap! fk


    I'm working on a soon-to-be commercial server application. The app makes frequent calls to the database using SqlCommand.ExecuteReader() method. The thing is that most of the time this works fine, however, sometimes even though this method returns a SqlDataReader object BUT when I call the Read() method it returns false!I have tested the code with single record only, and my sql statement sould definitely return one row. However, most of the times it does but sometimes it just doesn't - Read() method returns false. I've spent almost 7 hours searching the internet and debugging my code but can't find a solution to this issue.Few things: I'm not sharing the connection, and I close sqldatareader promptly. Please help me fix this asap!

    DB:2.37:Weired Sqlcommand.Executereader Error. Need Help Asap! fk

     
    Hi, 
     
    Thank you for your post!  I would suggest posting your question in one of the MS Forums,MSDN  Forums Home  SQL Server located here: http://social.msdn.microsoft.com/Forums/en-US/category/sqlserver/Have a great day!Kiran Polimetla
    Tier 2 Application Support
    Server and Tools Online Engineering Live Services Team

  • RELEVANCY SCORE 2.37

    DB:2.37:Setsuspendstate Fails With No Error Code 9c


    I try to put Windows XP SP3 into sleeplike so:
    SetSuspendState(FALSE, FALSE, FALSE);
    but it returns FALSE and GetLastError returns 0 and computer doesn't enter sleep.
    I also tried to see what sleep states are supported by callingGetPwrCapabilities() and checkingSYSTEM_POWER_CAPABILITIES::SystemS3
    andSYSTEM_POWER_CAPABILITIES::SystemS4. They both return TRUE. AlsoIsPwrSuspendAllowed() returned TRUE.
    So why am I getting this error and how to fix it?

    DB:2.37:Setsuspendstate Fails With No Error Code 9c

    If this is just on one laptop, perhaps some driverfails the sleep, or itsBIOS is lying aboutS3 support, orsomething else goes wrong on the Windows side. The power management stuff is very complicated. Can you suspend it
    manually?
    --pa

  • RELEVANCY SCORE 2.37

    DB:2.37:Can Not Start Gui Application From Vista/Windows 2008 Service d1


    My application is much dependent on registries and %ProgramFile%, and it has to automatically switch between servers when one fails. So the way to embed manifest file can not meet my requirements
    -- because users need to confirm the UAC dialog manually.

    I lean from http://www.codeproject.com/KB/vista-security/VistaSessions.aspx that Windows service can start up GUI application without UAC dialog popping up. So I use a local system service to run
    my application, sure the Allow Service to interact with desktop is configured by default.

    But here comes new problems: My application can be found by Process Explorer and it is under session 1 and it can work. But the GUI is hidden and I can not find it on current desktop -- remote by
    mstsc /console.

    Do you know where my problem is? How to let the GUI appear on current desktop? Thanks,

    --------------Code part---------------------------

    static CEriLogFile log(EPlusShell.log);

    log.Write(Into LaunchAppIntoDifferentSession);

    CString errorCode;

    PROCESS_INFORMATION pi;

    STARTUPINFO si;

    BOOL bResult = FALSE;

    DWORD dwSessionId,winlogonPid;

    HANDLE hUserToken,hUserTokenDup,hPToken,hProcess;

    DWORD dwCreationFlags;

    // Log the client on to the local computer.

    dwSessionId = WTSGetActiveConsoleSessionId();

    //////////////////////////////////////////

    // Find the winlogon process

    ////////////////////////////////////////

    PROCESSENTRY32 procEntry;

    HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);

    if (hSnap == INVALID_HANDLE_VALUE)

    {

    log.Write(CreateToolhelp32Snapshot Error!);

    return 1 ;

    }

    procEntry.dwSize = sizeof(PROCESSENTRY32);

    if (!Process32First(hSnap, procEntry))

    {

    log.Write(Process32First Error!);

    return 1 ;

    }

    do

    {

    if (_stricmp(procEntry.szExeFile, winlogon.exe) == 0)

    {

    // We found a winlogon process...make sure it's running in the console session

    DWORD winlogonSessId = 0;

    if (ProcessIdToSessionId(procEntry.th32ProcessID, winlogonSessId) winlogonSessId == dwSessionId)

    {

    winlogonPid = procEntry.th32ProcessID;

    break;

    }

    }

    } while (Process32Next(hSnap, procEntry));

    ////////////////////////////////////////////////////////////////////////

    WTSQueryUserToken(dwSessionId,hUserToken);

    dwCreationFlags = NORMAL_PRIORITY_CLASS|CREATE_NEW_CONSOLE;

    ZeroMemory(si, sizeof(STARTUPINFO));

    si.cb= sizeof(STARTUPINFO);

    si.lpDesktop = winsta0\\default;

    ZeroMemory(pi, sizeof(pi));

    TOKEN_PRIVILEGES tp;

    LUID luid;

    hProcess = OpenProcess(MAXIMUM_ALLOWED,FALSE,winlogonPid);

    if(!::OpenProcessToken(hProcess,TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY

    |TOKEN_DUPLICATE|TOKEN_ASSIGN_PRIMARY|TOKEN_ADJUST_SESSIONID

    |TOKEN_READ|TOKEN_WRITE,hPToken))

    {

    int abcd = GetLastError();

    errorCode.Format(%s, abcd);

    log.Write(Process token open Error: errorCode);

    printf(Process token open Error: %u\n,GetLastError());

    }

    if (!LookupPrivilegeValue(NULL,SE_DEBUG_NAME,luid))

    {

    log.Write(Lookup Privilege value Error!);

    printf(Lookup Privilege value Error: %u\n,GetLastError());

    }

    tp.PrivilegeCount =1;

    tp.Privileges[0].Luid =luid;

    tp.Privileges[0].Attributes =SE_PRIVILEGE_ENABLED;

    DuplicateTokenEx(hPToken,MAXIMUM_ALLOWED,NULL,SecurityIdentification,TokenPrimary,hUserTokenDup);

    int dup = GetLastError();

    //Adjust Token privilege

    SetTokenInformation(hUserTokenDup,TokenSessionId,(void*)dwSessionId,sizeof(DWORD));

    if (!AdjustTokenPrivileges(hUserTokenDup,FALSE,tp,sizeof(TOKEN_PRIVILEGES),(PTOKEN_PRIVILEGES)NULL,NULL))

    {

    int abc =GetLastError();

    printf(Adjust Privilege value Error: %u\n,GetLastError());

    }

    if (GetLastError()== ERROR_NOT_ALL_ASSIGNED)

    {

    log.Write(Token does not have the privilege!);

    printf(Token does not have the privilege\n);

    }

    LPVOID pEnv =NULL;

    if(CreateEnvironmentBlock(pEnv,hUserTokenDup,TRUE))

    {

    dwCreationFlags|=CREATE_UNICODE_ENVIRONMENT;

    }

    else

    pEnv=NULL;

    // Launch the process in the client's logon session.

    bResult = CreateProcessAsUser(

    hUserTokenDup,
    // client's access token

    _T(C:\\Program Files\\...\\***Ext.exe),
    // file to execute

    NULL, // command line

    NULL,
    // pointer to process SECURITY_ATTRIBUTES

    NULL,
    // pointer to thread SECURITY_ATTRIBUTES

    FALSE,
    // handles are not inheritable

    dwCreationFlags, // creation flags

    pEnv,
    // pointer to new environment block

    NULL,
    // name of current directory

    si,
    // pointer to STARTUPINFO structure

    pi
    // receives information about new process

    );

    // End impersonation of client.

    //GetLastError Shud be 0

    int iResultOfCreateProcessAsUser = GetLastError();

    errorCode.Format(%s, iResultOfCreateProcessAsUser);

    log.Write(CreateProcessAsUser Error: errorCode);

    //Perform All the Close Handles task

    CloseHandle(hProcess);

    CloseHandle(hUserToken);

    CloseHandle(hUserTokenDup);

    CloseHandle(hPToken);

    DB:2.37:Can Not Start Gui Application From Vista/Windows 2008 Service d1

    Thank you very much.
    Yes, two parts design sounds good and I am trying to implement this.
    For the hidden GUI application, I see where the problems is. It is already started up and it is run not in current desktop but in other sessions. Remote desktop can not see this GUI application, but the local desktop can.
    One more question, is there way to switch/remote to a specific session? Such as the service started application is run in session1 and how to remote to session1 to view the detail? mstsc /admin can not do this.