Visual C++ :: Retrieve List Of GPO Currently Applied To Workstation?

Feb 24, 2014

How to retrieve a list of GPOs that are currently applied to the workstation?

View 14 Replies


ADVERTISEMENT

Visual C++ :: Retrieve Size From Image List

Mar 11, 2014

The documentation states that "An image list is a collection of same-sized images" [URL].....

But how do I retrieve that size? I have a pointer to an empty image list. The size was set during creation, but that's out of my control.

View 8 Replies View Related

Visual C++ :: How To Log Off A User When Workstation Is Locked

Nov 30, 2013

I wrote a Windows application that comes with two modules: service and user-mode exes. The service implements its own scheduler and may log-off a user at a predefined time. For that I was using the following call that is triggered from my user-mode module exe in a logged-on user session that has to be logged off:

Code : BOOL result = ExitWindowsEx(EWX_LOGOFF, reason);

This works fine, except of the situation when a user's account is locked. In that case that API doesn't seem to do anything at all even through I get 1 returned from it.

So I was curious, is there any other way to log off a user when their account is locked? (One condition I have in this case is that if that user had any unsaved documents then the log-off should not be forced.)

View 9 Replies View Related

C# :: How To Retrieve All Rows In Database Using List

Feb 17, 2014

I wanted to retrieve all rows from database and display in listview using list<string>

con.Open();
MySqlCommand view = new MySqlCommand("Select Cust_ID,Fname,Mname from Customer;", con);
MySqlDataReader v1 = view.ExecuteReader();
while (v1.Read()) {
for (int i = 0; i < v1.FieldCount; i++){
result.Add(v1["Cust_ID"].ToString());

[Code] .....

View 4 Replies View Related

C++ :: Sweep Line Algorithm Applied To Segment Intersection?

Apr 26, 2013

I need updating binary search three. I am working on implementation of Bentley-Ottoman algorithm for finding intersections of line segments in the plane. Code I designed works properly for all, but certain types of triangles. What is happening is that one intersection inside the triangle is never detected due to a fact that segments which intersect in that point never become neighbors in binary search tree.

class segment{
double x1,y1,x2,y2;
int name;

[Code]....

View 1 Replies View Related

Visual C++ :: Retrieve IP Information On Any Windows

Sep 23, 2012

I used to retrieve IP and NIC information by querying windows registry. Now I'm trying to use GetAdapterAddresses() API. Using GetAdapterAddresses() to get IP is not that easy, I need to dig a long deep as I check some examples so far, anyways my question is: Calling this API will return success on all versions of Windows ie: 32bits & 64bits ?

Though Microsoft has not opened any source, where this API is actually retrieving Windows IP information.?. Is it reading Registry or some windows file.

View 6 Replies View Related

C++ :: App Run In Workstation But Not In Servers

Feb 19, 2013

I'm developing an app on my PC workstation (XP Pro, 32) and could run well, but the same app could not run on PC servers (W2003 Server).

The problem is, part of the code always jump to the catch(...) on Server while it runs well on workstation (try() processed successfully).

View 2 Replies View Related

Visual C++ :: Retrieve PIDL Of Selected Folder?

May 13, 2014

I am maintaining a legacy VC++ 6 project.

When I use SHBrowseForFolder I can retrieve a PIDL of the selected folder and with this PIDL I can get the path with SHGetPathFromIDList.

Now, given a path to a folder, I want to retrieve its PIDL. How can I do it? I tried SHParseDisplayName() but seems that function is unsupported in VC++ 6.0

View 3 Replies View Related

Visual C++ :: Place Binary Array Into And Then Retrieve From Registry

Feb 12, 2013

I have used the following code to attempt to place a binary array into and then retrieve from the Registry. I am a member of the local Administrator group. I have verified that the Registry for the app has a binary array 32 bytes in length under the key "settings" / "keyb" ab 12 cd ...

Code:
// in header
unsigned char m_key[32];
int m_nKeySize;
// in implementation
// int ctor
AfxGetApp()->GetProfileBinary(_T("settings"), _T("keyb"), (LPBYTE*)&m_key, (UINT*)&m_nKeySize);
// in OnDestroy
AfxGetApp()->WriteProfileBinary(_T("settings"), _T("keyb"), (LPBYTE)&m_key, m_nKeySize );

Here is a copy of the binary array in the Registry:

7D DE 2B 30 E7 06 12 AC 99 60 8C 26 21 FC 8E 5B 66 DB 72 9E A2 00 BE 15 E1 8B 67 31 E5 EC 8B 15

Here is the binary key retrieved from the Registry using the code above:

D0 EB 26 00 CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC CC

View 7 Replies View Related

Visual C++ :: How To Retrieve Window Proc In Process Running In Other User

Apr 25, 2014

I am encountering a problem on retrieving the Window Proc of a window that running in a process with another user.

For example, I have logon windows with domainuser1, and run the following command as:

runas /profile /env /user:domainuser2 C:WindowsSystem32calc.exe

And then the Calculator is shown in domainuser1 desktop, but the process is running in domainuser2 account.

When running Spy++ (either wither domainuser1 or domainuser2) to view the calculator window, the Windoe Proc field is shown 'Unavailable' I also try to call GetWindowLong against this window, it will always returns NULL.

I am just wondering if it is possible to retrieve the Window Proc of the window running in a process of another account, is is possible?

View 9 Replies View Related

Visual C++ :: How To Retrieve Remote Desktop User Domain Name On Win2008 Server

Oct 9, 2012

How can I do this??

Suppose I have Win2008server and many users from defferent domains log in, so every user has its own session.

How can I obtain from the session the domain name of the user who logged in to server??

View 1 Replies View Related

C# :: Retrieve Datetime From SQL?

Nov 4, 2014

i have saved my data in sql and i can retrieve them except datetime i can't retrieve ,, this is my code

SqlCommand cmd1 = new SqlCommand("select ID,name,carplatnumber,cartype,expiredate,badgtype from [ID-personal] where id like('" + textBox1.Text + "%')", cn);
SqlDataReader dr1;

[Code].....

View 11 Replies View Related

C++ :: Retrieve A Pointer From Stack?

Aug 28, 2013

In c89/90 is there a way to retrieve a pointer from stack or whatever that would behave as this would once cast to the correct type? This is more of a curiosity than a requirement.

View 6 Replies View Related

C/C++ :: Retrieve Data From USB Device

Jun 16, 2014

I am looking to retrieve data from a USB device, this device is a fingerprint scanner. Because I bought it online and wasn't reading carefully enough, drivers and other installation programs weren't included. Send it back? Nah . . .

I want to see if it is possible to retrieve data from this device. To be honest, I don't even know if it's possible, but I would love to give it a whack.

I looked into making INF files and things Microsoft has put out, but I honestly don't know where to start simply because I have absolutely no experience doing this. I have a program set up to organize the data and such, I just need to find a way to actually get it.

What should I research and look into? Are drivers necessary?

Here is a little more information :-)

I want to save data from a fingerprint scanner.I bought a fingerprint scanner, but nothing came with it (drivers, software, etc.). I decided to not return it and see what fun I could have.

I have no code written up yet (mainly because I don't know where to start). But I looked into the device a little...Microsoft recognizes it as a "Fingerprint Scanner" but is still considered unrecognized.I have the USB identifier (at work right now, don't have it on hand)...

Is it even possible to communicate with the device without the initial drivers.Do I really need drivers for the device, or can I communicate with it as it is now.If I do need drivers, where should I start?What should I look into to get communicating with the device?

View 6 Replies View Related

C++ :: Retrieve The Image From URL And Save It In Array?

Sep 10, 2013

I am trying to retrieve an image from its URL as an array where each box represents the pixel value of the image.

View 3 Replies View Related

C++ :: Retrieve Data / Files From A Server?

Feb 25, 2013

I was wondering if i had to say simply retrieve data from a server whether it be simple plain text for variables or download whole files (FTP), what would be the best method for this? I would imagine there is a pretty big difference between retrieving text and downloading files but im just wondering what the best thing would be to research for both.

View 3 Replies View Related

C++ :: Retrieve Object From Hash Table

Feb 25, 2013

I'm trying to retrieve the Player object from my hash table so I can edit the content of that object. Here is what I have.

Player* HashTable::retrieve(char * key, Player& aPlayer) {
//calculate the retrieval position (the index of the array)
size_t index = calculateIndex(key);
//search for the data in the chain (linked list)
node * curr = table[index];
char id[100];

[Code] .....

Here I'm calling the retrieve and I need to return a pointer of that object.

Player* PlayerDB::FetchPlayer(char* name) {
Player* info = new Player();
out << "Fetching player " << """ << name << "" -- ";
if(h.retrieve(name, *info)) {
out << "Success!" << endl;

[Code] .....

And here is my call in main.
Player* outPlayer = NULL;
outPlayer = pdb.FetchPlayer("Sappho");
if (outPlayer != NULL) {
outPlayer->LevelUp();
}

I'm just trying to change the actual level of the player using the LevelUp function, but right now it is not making that change. I've been told I need to return a reference of the object in my retrieve function, but I thought that was what I was doing already.

View 3 Replies View Related

C/C++ :: Retrieve Index After Bsearch Or Lfind?

Jul 15, 2014

Basically, I'm trying to figure out the index in an array from a pointer that is returned by either bsearch or lfind.

void *val;
void *begin = (char *)v->elems (I need to use this separate variable)

Then, I call on either search, which seems to be working fine...

val = bsearch(key, begin, v->count, v->elemsz, cmp);

I'm trying to do the following:

index = *(int*)((char*)value_to_find - (char*)start_ptr)/sizeof(cv->elemsz)

However it segfaults everytime I do this. My logic is that I cast both void pointers to type of char*, then subtract the distance b/w the pointers since you can't do pointer arithmetic on void. I divide this by the size of each element to return the index, which needs to be cast to an int. What am I missing here?

View 1 Replies View Related

C# :: How To Retrieve Only Date From Datetime From Database

Nov 25, 2014

i have a form in which i have a field date of birth , and a textbox to fill date of birth , when a person fills his date of birth like 01/01/1990 , then it will be saved into database , and when i retrieve this date form database then this comes 01/01/1990 12:00 AM , i want only date part from it.

This is my form to fillup date of birth

form.aspx
<tr>
<td width="30%">
Date of Birth
<br />
</td> <td style="width: 1px">
:<asp:TextBox ID="txtDateofBirth" runat="server" placeholder="dd/mm/yyyy"></asp:TextBox>
</td> <td class="td2">
</td>
</tr>

this is code for form.aspx.cs

SqlCommand cmd = new SqlCommand("insert into ApplicantForm(NameofApplicant, dateofbirth)" +
"values( @NameofApplicant, convert(Datetime, @dateofBirth, 103)", con);
cmd.Parameters.AddWithValue("@dateofBirth",txtDateofBirth.Text);

this is code for print of this date of birth

print.aspx

<asp:Label ID="txtDOB" runat="server" ></asp:Label>

this is code print.aspx.cs

SqlCommand cmd = new SqlCommand("Select * from ApplicantForm Where ApplicantId=" + ((Request.QueryString["ApplicantId"])) + "", con);
dr = cmd.ExecuteReader();
txtDOB.Text = dr["dob"].ToString();

View 2 Replies View Related

C/C++ :: Let User Retrieve Array Element?

Jan 26, 2015

How to shorten it but it would need the user to set a variable's value and use that variable to call the array element.

int main() {
const int size = 3;
int choice;

[Code].....

View 6 Replies View Related

C# :: Retrieve Geolocation In Windows Form

Feb 25, 2015

how would i recieve the latitude and longitude from this xml

XmlTextReader reader = new XmlTextReader
("http://maps.googleapis.com/maps/api/geocode/json?address=" + postcode);

it should reurn the array

the php code is :

$url = 'http://maps.googleapis.com/maps/api/geocode/json?address=' . $search_code . '&sensor=false';
$json = json_decode(file_get_contents($url));
$lat = $json->results[0]->geometry->location->lat;
$lng = $json->results[0]->geometry->location->lng;
return array($lat,$lng);

View 6 Replies View Related

C++ :: How To Store And Retrieve Data In Class

Aug 20, 2014

I have a class I use to store column data read from delimited text files.

Code:
class column_data {
// class functions here
public:
// initialize class members
column_data()
: header(""),

[Code] ....

Each column is read into the vector of string. Next the string data is copy converted to the vector of double or the vector of int depending on the data type. There can also be additional transformations of the data (normalization, scaling, etc) and the transformed data is copied to the transformed_double_data vector. I do end up with multiple copies of the data, but I can clear some of the vectors if I don't need all the versions of the data anymore. Each column object goes into a container like a vector of objects or map of objects depending on how I need to access the column data.

There are functions that calculate statistics on the data in the columns and the results are assigned to the object variables like validate_r2. There are separate statistics for each column, so it seems logical to store the results in the column object. This works well for statistics like validate_r2 (pearson's correlation coefficient).

The current issue is that I have other statistics like "pw50" that I need to calculate and store. The statistic is the percent within +/- 50 units and the request for pw50 is passed in from the command line. The issue is that there could be several of these and they can have more or less any value like, pw50, pw75, pw100, etc. Storing data like this doesn't fit into my scheme very well because I can't pre-declare a variable to hold the result for every possible option. I don't know in advance how many, if any, of these there will be. I was thinking of adding two vectors, one of string and one of double,

Code:
class column_data {
public:
// initialize class members
column_data()
: header(""),
type(""),
use(""),
validate_r2(0.0),

[Code] ....

For each of this type of statistic requested, I would push_back a label into the string vector and then put the result into the parallel position in the double vector. This seems like I would work, but there are probably some things that could be done with pointers that might be better. Another option would be a vector of objects where each object had a string value for the label and a double for the result. That would be more bullet proof as far as keeping the label and value together, but I have not ever nested objects in a class like that so I thought I would post. I don't know the syntax for declaring an object of class_b inside the definition of class_a. The need is to provide dynamic storage for an unspecified number of these statistics and a reliable way to retrieve the values using the label.

View 1 Replies View Related

C :: Unable To Retrieve String As Array Variable

Feb 11, 2014

I am trying to read a tab delimited file containing 8 columns and store each element of the column as an 1-dimensional array. Though the program prints the strings correctly as in the commented printf but it doesn't give me first_col[0] value and so on. My code is as follows:

Code:

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main() {
FILE *int_file1;
int BUF = 1024;

[Code]...

The inputfile test.txt has the following elements:

34932 13854 13854 2012-01-07
172098 49418 53269 2012-01-07
-
-
-

View 7 Replies View Related

C++ :: Retrieve Information From Two Files And Put Them In A Single File

Nov 23, 2013

I created a simple program that writes some text to two different text files. how to create a program that would retrieve the information from those two files, and put them in a single file, first the content of input1 and then the content of input2. how to do this. Here is the program that I created that creates the two files.

#include <iostream>
#include <fstream>
#include <string>
int main() {
using namespace std;
string input1;
ofstream fout("input1.txt");

[Code]...

View 3 Replies View Related

C++ :: Text File - Retrieve And Print Out Contents

Jul 25, 2013

I've created a text file with the numbers from 1-450. After writing code to retrieve and print out the contents in the text file, the compiler only printed out the numbers 124-450. Is there a reason why this is happening?

View 19 Replies View Related

C++ :: Linked Lists - Retrieve Data From Nodes?

Feb 9, 2013

I am working on a linked list that instead of the traditional integer value for a data, i'm using my own class. Unfortunately when i do this, i cant seem to retrieve my data from my Node.

#include "Customer.h"
class Node {
// TO DO:: Fill in.
//Constructors and destructor
public:
Node();
Node(int atime, int ttime);
Node(int atime, int ttime, Node* nd);

[Code] .....

In my main code, I've been trying something like

Node* c = new Node(1,2)
Customer x = c->cust; // or Customer x = c->get_cust();
cout<<x.get_atime()<<endl;
cout<<x.get_ttime()<<endl;

It should be displaying 1 and then 2, but just outputs 0 and 0.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved