Turns out my pointers were messed up:
cStr = strncat(cStr, "\0", 1); // doesn't do anything
replaced with:
*(cStr + size) = '\0'; // size is hardcoded for now
and changed fwrite to
fwrite( cStr, size, 1, stream );
...the binary string? this is one of the reason they tell us to encode binary data when using a null terminated string to contain it.
My code:
char * cStr = reinterpret_cast< char *>(lpVoid);
cStr = strncat(cStr, "\0", 1);
printf("size of cStr%d\n", sizeof(cStr));
FILE * stream;
if( (stream =...
Is there a way to customize CreateProcessWithLogonW
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocesswithlogonw.asp)
but have it do a function call instead?
I'm currently doing something like this and want to cut my utility down to one exe instead...
Solved my problem.. I was searching for a string in an array of strings so the following was needed:
foreach $string (@output) {
print "checking for '$success' in: $string";
if ($string =~ /$success/s)
{
print "ISDN connection to $ip ($desc) failed\n";
}
}
Anyone know why this regular expression search isn't working properly?
I'm using use Net::Telnet::Cisco; to populate the @output variable if that matters..
#my $success = "Success rate is 0 percent";
my $success = "Success";
@output = $session->cmd(String => join (' ', 'ping', $ip)...
...that will execute the following:
select name, dbid, status, version from master.dbo.sysdatabases where name like N'%' -- get list of dbs
select * from msdb.dbo.backupset where database_name='<db_name>' and type='D' order by backup_start_date
By doing the above I believe I will get the...
Is there any way to programatically create an appointment in Exch 5.5 via c++? I have found tons of code/samples for doing this in Exchange 2000/2003, but nothing for 5.5.
For example, in 2000 I am told to import the following type libraries in my code:
#import "C:\Program Files\Common...
Is it possible to use GPMgmt.GPM to make changes to the local computer policy or is this object limited to domain level policies?
If it is possible to modify local policy using this method, does anyone have sample code?
Here's sample code of what I've found. As you can see it explicitly...
I'm unable to modify and save Access 2003 SP 2 macro security settings beyond medium/default except through Local Group Policy (via the office11.adm here http://office.microsoft.com/en-us/assistance/HA011513711033.aspx). The options aren't grayed out in Access - they just don't save (after...
...a string of the SELECT objects selected indexes. A duplicate selection will be easily detectable. An example of a 'valid' indexString would be *2**1**3*. There are asterisks to both sides of each index as it is added. This allows for expandability to a number of SELECTs greater than 9...
I have a page where I generate x number of rows each with a dropdown box. Values for the dropdown list and default selected values will be chosen on initial page load for each dropdown.
I want to write some javascript that will make it so there aren't any values that are redisplayed for any...
...to get it to a LPCWSTR.
So far, I have :
std::string input="encrypted_password_text.."
std::string output; // decrypted password
Encryptor * e = NULL;
e = new Encryptor();
e->DecryptString(input, output);
const char* lpPasswordTmp = output.c_str();
const WCHAR * lpPassword =...
In the SMS scripting reference provided by Microsoft, I have found the following information about deleting objects in SMS via WMI:
Get the instance of the required SMS object by using GetObject and supplying the path to the required object. For example, to get an instance of an advertisement...
The problem is that dates are showing up incorrectly when returned from a stored procedure: i.e. 12:00:00 AM (when using CDate conversion), or 12/30/1899 (via rs("columnname").Value)
Here is the ASP code:
If not rs.BOF and not rs.EOF Then
Do Until rs.EOF
%> <tr>
<td><%=rs("OSVer")%></td>...
Has anyone come across any issues with querying AD attributes such as: modifyTimeStamp, pwdLastSet, lockoutTime, and lastLogonTimestamp (big ints/intervals, and datetime values(?)).
It seems to be the case that I need to do something different to obtain/display large integer values from the...
...drives).
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
("Select * From CIM_DataFile Where extension = 'PST' AND Drive='c:'")
For Each objFile in colFiles
' do stuff here..
Next...
Is it possible to dynamically (as a result of an OnClick event) add controls to a panel, etc. without doing a postback? I assume there's no way around an asp:button doing a postback, but there doesn't seem to be a whole lot of other options:
Web controls with non-postback events: checkbox...
...country from locations order by city";
type = "Locations";
PopulateSelect(sqlCommand, connString, type);
sqlCommand = "select * from [Job Titles] order by job_title";
type = "Jobs";
PopulateSelect(sqlCommand, connString, type);
type = "PhoneNumberTypes"...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.