Need an STL (std:string) API call example

I'm writing a little utility and thought I would include in it the code necessary to
allocate a buffer and fill it up with an API call. The API call is one of those that takes
a NULL, 0 pair and returns the length. For example, in MFC, I would do

CString s;
int length = SomeAPICall(..., NULL, 0);
LPTSTR data = s.GetBuffer(length);
SomeAPICall(...,data, length);
s.ReleaseBuffer();

what I want to write is

std::string s;
int length = SomeAPICall(..., NULL, 0);
....and then I'm stuck

I'll be happy to put credit to you in the About... box. (of course that might be a mixed
blessing, since if the code isn't right, they'll know who to blame...)

What this utility does is create some text in a readonly edit control which can be copied
and pasted to save time in obtaining the appropriate results. I have radio buttons for C,
C++, MFC and STL, but I am clueless how to write something using std::string involving
passing the std::string to API calls.
			thanks
				joe

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
3/31/2005 10:30:29 AM
vc.mfc 33608 articles. 0 followers. Follow

15 Replies
509 Views

Similar Articles

[PageSpeed] 39

Joseph M. Newcomer wrote:
> I'm writing a little utility and thought I would include in it the code necessary to
> allocate a buffer and fill it up with an API call. The API call is one of those that takes
> a NULL, 0 pair and returns the length. For example, in MFC, I would do
> 
> CString s;
> int length = SomeAPICall(..., NULL, 0);
> LPTSTR data = s.GetBuffer(length);
> SomeAPICall(...,data, length);
> s.ReleaseBuffer();
> 
> what I want to write is
> 
> std::string s;
> int length = SomeAPICall(..., NULL, 0);
> ...and then I'm stuck

You can't do that with string. You could do it with vector though.

> I'll be happy to put credit to you in the About... box. (of course that might be a mixed
> blessing, since if the code isn't right, they'll know who to blame...)
> 
> What this utility does is create some text in a readonly edit control which can be copied
> and pasted to save time in obtaining the appropriate results. I have radio buttons for C,
> C++, MFC and STL, but I am clueless how to write something using std::string involving
> passing the std::string to API calls.
> 			thanks
> 				joe
> 
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm
0
OlafvdSpek (88)
3/31/2005 10:58:20 AM
"Olaf van der Spek" <OlafvdSpek@GMail.Com> wrote in message 
news:eh2qMCeNFHA.3760@TK2MSFTNGP12.phx.gbl...
> Joseph M. Newcomer wrote:
>> I'm writing a little utility and thought I would include in it the code 
>> necessary to
>> allocate a buffer and fill it up with an API call. The API call is one of 
>> those that takes
>> a NULL, 0 pair and returns the length. For example, in MFC, I would do
>>
>> CString s;
>> int length = SomeAPICall(..., NULL, 0);
>> LPTSTR data = s.GetBuffer(length);
>> SomeAPICall(...,data, length);
>> s.ReleaseBuffer();
>>
>> what I want to write is
>>
>> std::string s;
>> int length = SomeAPICall(..., NULL, 0);
>> ...and then I'm stuck
>
> You can't do that with string. You could do it with vector though.

Specifically(untested):

std::vector<char> data( SomeAPICall( ..., NULL, 0 ) );

SomeAPICall( ..., &data[0], data.size() );

std::string stringdata( data.begin(), data.end() );


Which, using boost could be encapsulated into a function:

std::string StringFrom( const boost::function2<std::string,char*,size_t>& 
aFnc )
{
    std::vector<char> data( aFnc( NULL, 0 ) );

    aFnc( &data[0], data.size() );

    return std::string stringdata( data.begin(), data.end() );
}

which could be called:

    std::string mystring = StringFrom( boost::bind( SomeApiCall, ..., _1, 
_2 ) );

Jeff Flinn 


0
not1 (120)
3/31/2005 1:00:04 PM
"Jeff F" <not@anywhere.com> wrote in message 
news:%23qfhQGfNFHA.1500@TK2MSFTNGP09.phx.gbl...
>
> "Olaf van der Spek" <OlafvdSpek@GMail.Com> wrote in message 
> news:eh2qMCeNFHA.3760@TK2MSFTNGP12.phx.gbl...
>> Joseph M. Newcomer wrote:
>>> I'm writing a little utility and thought I would include in it the code 
>>> necessary to
>>> allocate a buffer and fill it up with an API call. The API call is one 
>>> of those that takes
>>> a NULL, 0 pair and returns the length. For example, in MFC, I would do
>>>
>>> CString s;
>>> int length = SomeAPICall(..., NULL, 0);
>>> LPTSTR data = s.GetBuffer(length);
>>> SomeAPICall(...,data, length);
>>> s.ReleaseBuffer();
>>>
>>> what I want to write is
>>>
>>> std::string s;
>>> int length = SomeAPICall(..., NULL, 0);
>>> ...and then I'm stuck
>>
>> You can't do that with string. You could do it with vector though.
>
> Specifically(untested):
>
> std::vector<char> data( SomeAPICall( ..., NULL, 0 ) );
>
> SomeAPICall( ..., &data[0], data.size() );
>
> std::string stringdata( data.begin(), data.end() );
>
>
> Which, using boost could be encapsulated into a function:
>
> std::string StringFrom( const boost::function2<std::string,char*,size_t>& 
> aFnc )
> {
>    std::vector<char> data( aFnc( NULL, 0 ) );
>
>    aFnc( &data[0], data.size() );
>
>    return std::string stringdata( data.begin(), data.end() );

oops - cut and paste error:

     return std::string( data.begin(), data.end() );

> }
>
> which could be called:
>
>    std::string mystring = StringFrom( boost::bind( SomeApiCall, ..., _1, 
> _2 ) );
>
> Jeff Flinn
> 


0
not1 (120)
3/31/2005 1:03:35 PM
Jeff F wrote:
> "Olaf van der Spek" <OlafvdSpek@GMail.Com> wrote in message 
> news:eh2qMCeNFHA.3760@TK2MSFTNGP12.phx.gbl...
> 
>>Joseph M. Newcomer wrote:
>>
>>>I'm writing a little utility and thought I would include in it the code 
>>>necessary to
>>>allocate a buffer and fill it up with an API call. The API call is one of 
>>>those that takes
>>>a NULL, 0 pair and returns the length. For example, in MFC, I would do
>>>
>>>CString s;
>>>int length = SomeAPICall(..., NULL, 0);
>>>LPTSTR data = s.GetBuffer(length);
>>>SomeAPICall(...,data, length);
>>>s.ReleaseBuffer();
>>>
>>>what I want to write is
>>>
>>>std::string s;
>>>int length = SomeAPICall(..., NULL, 0);
>>>...and then I'm stuck
>>
>>You can't do that with string. You could do it with vector though.
> 
> 
> Specifically(untested):
> 
> std::vector<char> data( SomeAPICall( ..., NULL, 0 ) );
> 
> SomeAPICall( ..., &data[0], data.size() );
> 
> std::string stringdata( data.begin(), data.end() );

Just wondering, what do you do if the size of the data increases between 
the first and second call (race-condition)?
0
OlafvdSpek (88)
3/31/2005 1:35:39 PM
> For example, in MFC, I would do
>
> CString s;
> int length = SomeAPICall(..., NULL, 0);
> LPTSTR data = s.GetBuffer(length);
> SomeAPICall(...,data, length);
> s.ReleaseBuffer();

With STL's string, you could do more or less the same:

int length = SomeAPICall(..., NULL, 0);
string s;
s.resize(length);
SomeAPICall(...,&s[0], length);

But it is a bit of a hack, IMHO, because it's cheating the string to give up
its internal data (&s[0]), maybe will not compile in some other slt
implementation. I'd do it if I knew this piece of code is causing perf
headache.

I'd rather do this:

int length = SomeAPICall(..., NULL, 0);
auto_ptr<char> PData(new char[length]);
SomeAPICall(...,PData.get(), length);
string s(PData.get());

There is one allocation more (for PData AND for the string itself), but it's
a "more proper" way of doing it.


0
Goran
3/31/2005 2:57:59 PM
On Thu, 31 Mar 2005 15:35:39 +0200, Olaf van der Spek wrote:

>> Specifically(untested):
>> 
>> std::vector<char> data( SomeAPICall( ..., NULL, 0 ) );
>> 
>> SomeAPICall( ..., &data[0], data.size() );
>> 
>> std::string stringdata( data.begin(), data.end() );
> 
> Just wondering, what do you do if the size of the data increases between 
> the first and second call (race-condition)?

That would be a problem only if access to the data controlled by the API is
multithreaded or you were to do something between assessing the size and
getting the text that changed the size. Neither typically apply to Windows
APIs and messages. Note that the SetWindowText documentation says,
"SetWindowText cannot change the text of a control in another application,"
so at least one pathological case cannot occur.

-- 
Doug Harrison
Microsoft MVP - Visual C++
0
dsh (2498)
3/31/2005 4:19:36 PM
On Thu, 31 Mar 2005 16:57:59 +0200, Goran Pusic wrote:

>> For example, in MFC, I would do
>>
>> CString s;
>> int length = SomeAPICall(..., NULL, 0);
>> LPTSTR data = s.GetBuffer(length);
>> SomeAPICall(...,data, length);
>> s.ReleaseBuffer();
> 
> With STL's string, you could do more or less the same:
> 
> int length = SomeAPICall(..., NULL, 0);
> string s;
> s.resize(length);
> SomeAPICall(...,&s[0], length);
> 
> But it is a bit of a hack, IMHO, because it's cheating the string to give up
> its internal data (&s[0]), maybe will not compile in some other slt
> implementation. I'd do it if I knew this piece of code is causing perf
> headache.

It will definitely compile, and it will even work on typical
implementations, but sadly, the C++ standard leaves std::string so
underspecified it can't be considered portable. There are two potential
problems:

1. There's no guarantee that resize(length) allocates room for the nul
terminator, which may be tacked on only if and when you call c_str(). So
you should resize(length+1), get the text, and then resize(length).

2. There's no guarantee that the string data is contiguous, though it is in
every implementation I'm aware of.

<aside>
In a sane string class, like the one I wrote :), I'd use code like this:

// For my string class, not std::string
const size_type nLen = ::GetWindowTextLength(hWnd);
uninitialized_resize(nLen);
resize(::GetWindowText(hWnd, raw_data(), nLen+1));

The function uninitialized_resize allocates room for the nul and adds it,
but it doesn't fill the (contiguous, for my class anyway) buffer with nuls,
like string::resize(n) does. The function raw_data avoids the copy-on-write
test since uninitialized_resize would already have forked the buffer. BTW,
this is true copy-on-write, not the flawed approximation allowed by the
standard, that was abandoned by most implementations, including VC7 and
later.

Note also that GetWindowTextLength is one of those functions that returns
an upper limit on the size, with the true size being returned by
GetWindowText.
</aside>

If you're willing to risk the portability issues discussed above, you could
use the following for a std::string s:

const string::size_type nLen = ::GetWindowTextLength(hWnd);
s.resize(nLen+1);
s.resize(::GetWindowText(hWnd, &s[0], nLen+1));

> I'd rather do this:
> 
> int length = SomeAPICall(..., NULL, 0);
> auto_ptr<char> PData(new char[length]);
> SomeAPICall(...,PData.get(), length);
> string s(PData.get());
> 
> There is one allocation more (for PData AND for the string itself), but it's
> a "more proper" way of doing it.

The auto_ptr type only ever uses delete, but you used new[], so there's an
unavoidable allocator/deallocator mismatch. You should use vector for this
purpose.

-- 
Doug Harrison
Microsoft MVP - Visual C++
0
dsh (2498)
3/31/2005 4:49:26 PM
Doug Harrison [MVP] wrote:
> On Thu, 31 Mar 2005 15:35:39 +0200, Olaf van der Spek wrote:
> 
> 
>>>Specifically(untested):
>>>
>>>std::vector<char> data( SomeAPICall( ..., NULL, 0 ) );
>>>
>>>SomeAPICall( ..., &data[0], data.size() );
>>>
>>>std::string stringdata( data.begin(), data.end() );
>>
>>Just wondering, what do you do if the size of the data increases between 
>>the first and second call (race-condition)?
> 
> 
> That would be a problem only if access to the data controlled by the API is
> multithreaded or you were to do something between assessing the size and
> getting the text that changed the size. Neither typically apply to Windows
> APIs and messages. Note that the SetWindowText documentation says,

Wouldn't it apply to GetCurrentDirectory()?

> "SetWindowText cannot change the text of a control in another application,"
> so at least one pathological case cannot occur.
> 
0
OlafvdSpek (88)
3/31/2005 5:01:29 PM
On Thu, 31 Mar 2005 19:01:29 +0200, Olaf van der Spek wrote:

> Wouldn't it apply to GetCurrentDirectory()?

Not on WinXP, AFAICT. At least I can't cd to a directory and change its
name, or copy a program into a directory, run it, and change the
directory's name, etc.

-- 
Doug Harrison
Microsoft MVP - Visual C++
0
dsh (2498)
3/31/2005 5:10:19 PM
There are few problems like this. For example, the EnumProcesses API is a classic example,
processes can come and go. For example, EnumProcesses given a pointer to an array of
process IDs, returns the number of bytes returned (the number of processes is obtained by
dividing this by sizeof(DWORD). But the problem is that if there are more processes than
buffer space, the remaining processes are simply lost. Another is the API call that reads
the entire string from a .INI file. In cases like this, you allocate a buffer, do the
operation, and if the bytes read equal the bytes allocated, you reallocate the buffer to
be bigger (most examples double the space) and try again, until you get fewer bytes
returned than your buffer size.

However, for the API calls, I'm concerned with, they are deterministic. Given a set of
parameters, there will be exactly one possible return type, but you don't know how long it
is until you query the length.
				joe

On Thu, 31 Mar 2005 10:19:36 -0600, "Doug Harrison [MVP]" <dsh@mvps.org> wrote:

>On Thu, 31 Mar 2005 15:35:39 +0200, Olaf van der Spek wrote:
>
>>> Specifically(untested):
>>> 
>>> std::vector<char> data( SomeAPICall( ..., NULL, 0 ) );
>>> 
>>> SomeAPICall( ..., &data[0], data.size() );
>>> 
>>> std::string stringdata( data.begin(), data.end() );
>> 
>> Just wondering, what do you do if the size of the data increases between 
>> the first and second call (race-condition)?
>
>That would be a problem only if access to the data controlled by the API is
>multithreaded or you were to do something between assessing the size and
>getting the text that changed the size. Neither typically apply to Windows
>APIs and messages. Note that the SetWindowText documentation says,
>"SetWindowText cannot change the text of a control in another application,"
>so at least one pathological case cannot occur.

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
3/31/2005 5:24:26 PM
Doug Harrison [MVP] wrote:
> On Thu, 31 Mar 2005 19:01:29 +0200, Olaf van der Spek wrote:
> 
> 
>>Wouldn't it apply to GetCurrentDirectory()?
> 
> 
> Not on WinXP, AFAICT. At least I can't cd to a directory and change its
> name, or copy a program into a directory, run it, and change the
> directory's name, etc.

But what if thread A calls GetCurrentDirectory for the first time to get 
it's return size, thread B then calls SetCurrentDirectory and thread A 
then calls GetCurrentDirectory, but the return value doesn't fit?
0
OlafvdSpek (88)
3/31/2005 5:29:58 PM
On Thu, 31 Mar 2005 19:29:58 +0200, Olaf van der Spek wrote:

> But what if thread A calls GetCurrentDirectory for the first time to get 
> it's return size, thread B then calls SetCurrentDirectory and thread A 
> then calls GetCurrentDirectory, but the return value doesn't fit?

Then the current directory is data accessed by multiple threads, and you
have a synchronization issue to deal with. You would need to protect all
access to the current directory functions with a mutex, understanding that
it's the underlying program state (i.e. data) you're really protecting.

-- 
Doug Harrison
Microsoft MVP - Visual C++
0
dsh (2498)
3/31/2005 5:36:35 PM
Doug Harrison [MVP] wrote:
> On Thu, 31 Mar 2005 19:29:58 +0200, Olaf van der Spek wrote:
> 
> 
>>But what if thread A calls GetCurrentDirectory for the first time to get 
>>it's return size, thread B then calls SetCurrentDirectory and thread A 
>>then calls GetCurrentDirectory, but the return value doesn't fit?
> 
> 
> Then the current directory is data accessed by multiple threads, and you
> have a synchronization issue to deal with. You would need to protect all
> access to the current directory functions with a mutex, understanding that
> it's the underlying program state (i.e. data) you're really protecting.

What about GetModuleFileName()?
You can rename a running EXE and you can't solve that with synchronization.
0
Olaf1 (34)
4/2/2005 9:53:42 PM
On Sat, 02 Apr 2005 23:53:42 +0200, Olaf van der Spek wrote:

> What about GetModuleFileName()?
> You can rename a running EXE and you can't solve that with synchronization.

Functions like GetModuleFileName require you to specify the buffer size.
When they indicate to you that the buffer is too small, you can try again
with a larger buffer. If you're asking if it's possible to "lock" the
filename, I guess you could open the file in a non-shared mode, but I don't
see how to avoid the race between determining the file to open and opening
it. For all I know, this is possible (steps 2 and 3 performed by another
party):

1. GetModuleFileName(fn)
2. rename(fn, fn2)
3. rename(fn3, fn)
4. open(fn)

-- 
Doug Harrison
Microsoft MVP - Visual C++
0
dsh (2498)
4/2/2005 10:49:37 PM
I've decided that since it is currently indeterminate, I'm simply going to provide an
escape to a user-specified code generation template and let people roll their own for
languages other than C, C++ and C++/MFC. I've already implemented this and it works.
					joe

On Thu, 31 Mar 2005 05:30:29 -0500, Joseph M. Newcomer <newcomer@flounder.com> wrote:

>I'm writing a little utility and thought I would include in it the code necessary to
>allocate a buffer and fill it up with an API call. The API call is one of those that takes
>a NULL, 0 pair and returns the length. For example, in MFC, I would do
>
>CString s;
>int length = SomeAPICall(..., NULL, 0);
>LPTSTR data = s.GetBuffer(length);
>SomeAPICall(...,data, length);
>s.ReleaseBuffer();
>
>what I want to write is
>
>std::string s;
>int length = SomeAPICall(..., NULL, 0);
>...and then I'm stuck
>
>I'll be happy to put credit to you in the About... box. (of course that might be a mixed
>blessing, since if the code isn't right, they'll know who to blame...)
>
>What this utility does is create some text in a readonly edit control which can be copied
>and pasted to save time in obtaining the appropriate results. I have radio buttons for C,
>C++, MFC and STL, but I am clueless how to write something using std::string involving
>passing the std::string to API calls.
>			thanks
>				joe
>
>Joseph M. Newcomer [MVP]
>email: newcomer@flounder.com
>Web: http://www.flounder.com
>MVP Tips: http://www.flounder.com/mvp_tips.htm

Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15972)
4/3/2005 6:06:38 AM
Reply:

Similar Artilces:

Not sure if Excel can do what i need
Hello all, I am obviously a new user to excel. I have a psychological assessmen that needs to be computerised for ease of use in obtaining results. Here is what i would like to happen. I have 28 questions with fiv Likert scale options(0-4) for answers. Each question addresses 1 of different personality traits. So questions 1, 6, 8, 22 look at anger. Where as questions 2, 9, 28 look at happiness. What i would like is fo excel to group the answers and give me the total number for each trait. Then based on that number, give out a prewritten (which i would provide result of the assessment. ...

Need Min Value from Row and Heading Value that Corresponds to it.
I have a table that looks somewhat like this w/o the *'d headings: h1 h2 h3 h4 h5 h6 h7 *Min Price *Heading $5.00 $6.00 $3.00 $4.00 $9.00 $1.00 $9.00 $1.00 h6 $3.00 $6.00 $8.00 $65.00 $9.00 $2.00 $4.00 $2.00 h6 $4.00 $9.00 $5.00 $7.00 $1.00 $2.00 $8.00 $1.00 h5 $9.00 $7.00 $6.00 $3.00 $9.00 $8.00 $2.00 $2.00 h7 $7.00 $8.00 $9.00 $7.00 $9.00 $8.00 $8.00 $7.00 h1 I have several SKU's with various price contract/programs. I want to find the best price in one cell and the heading that would correspond to that cell in another. I was trying to do this with an expression ...

Test for NULL string?
I have the following function: Function Foo (ByVal myData as String) ' Do stuff End Foo My question is, do I need to test if the "myData" parameter is null or invalid?? How can I best test the parater if it's valid or null or not?? (so i can avoid any errors) thankx Robert, Maybe this Function Foo(ByVal myData As String) If myData = vbNullString Then Foo = "No string passed to function" Exit Function End If ' Do stuff End Function Mike -- Mike When competing hypotheses are equal, adopt the hypothesis that i...

Excel need help
I have 2 columns a and b . a contains payment b contains balance. I have the entire col b with the formula. my ? is when the balance appearsin b it is in all the cells in that column.I only want it in the used ones, not the unused ones:( example $270.00 16,730.00 $270.00 16,460.00 $100.00 16,360.00 $300.00 16,060.00 $270.00 15,790.00 15,790.00 15,790.00 15,790.00 15,790.00 15,790.00 this 15790.00 is in col b...not a...I want no bal in unused cells -- fiftieslady ------------------------------------------------------------------------ fiftieslady's Profile: http://www.excelforum.co...

C# registry read converts string
i'm trying to read a registry key in both local and remote machines. for example the HKLM\SYSTEM\CURRENTCONTROLSET\SERVICES\LANMANWORKSTATION there is a key called "imagepath" this is a "reg_expand_sz" and it will look like: "%systemroot%\system32\svchost.exe -k netsvcs". when i run my code on either local or remote machine it will convert "%systemroot%" to the local machine system drive, in my cast "e:\system32\svchost.exe -k netsvcs". so now my output is incorrect. here is a sample of my code: if (t == Syst...

Need Help Linking Sheets
How can I link 2 pages without using the actual sheet as a reference? In other words, can I have two sheets linked by Identifying the same exact names one on each sheet? ...

Excel newbie needs help from math wiz (poker related)
I want to create a Excel workbook that will help in specific poker situations. Short version: I want to be able to calculate how often my opponent will need to fold for an all-in raise to show a positive expectation. Explanation: In poker you can win a hand by having the best hand at the end OR getting your opponent to fold. A common situation comes up where you have a "drawing hand" and face a bet by your opponent. In this situation you know you are currently behind in the hand, but have a chance to win if you catch some of your "outs" (cards that will give you th...

Macro help needed........
How do I sort a particular column in ascending order and change the pag setup to landscape and margins to 0.25 using a macro code ? does anyone have a macro code for this ????? -- Message posted from http://www.ExcelForum.com Hi you have already received some answers in your previous threads please don't multipost! -- Regards Frank Kabel Frankfurt, Germany > How do I sort a particular column in ascending order and change the > page setup to landscape and margins to 0.25 using a macro code ? > > does anyone have a macro code for this ?????? > > > --- > Me...

Need to test a mobo
I had a power surge about 3 weeks ago - lost a drive, now making ticking noises. I had another two drive that seem to work sporadically now. So, I thought it might have been my power supply. Bought a tester and found out that all seems well. Next, I bought a new hard drive and found that it was also acting up - making noises like whirring up and down (like the other drives I thought were dead). So I am starting to wonder if it is my mobo - but how can I test this out? I am using a dual boot - Win XP and Win 7 - both drives work and don't work. Up and down. Right now my Win7 ...

Help needed
is there anyway you can see what links to other workbooks are associated with the workbook you have open. The problem i am having is when i open the workbook in question a message appears and states "The workbook you opened contains automatic links to information in another workbook. do you want to update this workbook with changes made to the other workbook" Yes....... No. if i click No the workbook opens, however if i click Yes the workbook just hangs and i have to go into task manager to shut down the system. I can only assume that there is a problem with one of the links....

Need help on this....thanks
I have an Excel worksheet which stored a survey outcome of over 1200 members. There are over 30 questions in the survey and the first column captured the member ID. The problem is 3 of the survey questions that allow multiple answers, instead the answer for those three questions are captured in seperate column, the answers are stored in a single column and it makes it very difficult to analysis those result. As a result I created addittional columns depending on the total number of the answers available for that question and assign the result manually to that column. It is very time consuming ...

I need Help
I have a random popup that i cant stop,when it does come up it seems to know what i was looking at,like when i was looking for registry cleaner it popped up and showed me one,any help would be great. On Jan 22, 6:57=A0am, Larry <La...@discussions.microsoft.com> wrote: > I have a random popup that i cant stop,when it does come up it seems to k= now > what i was looking at,like when i was looking for registry cleaner it pop= ped > up and showed me one,any help would be great. To eliminate questions and guessing, please provide additional information about your sys...

need help badly
How do you print ole objects.. Thanks lachanda -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200710/1 On Wed, 03 Oct 2007 18:13:40 GMT, "misschanda via AccessMonster.com" <u36612@uwe> wrote: >How do you print ole objects.. >Thanks >lachanda What *kind* of OLE objects? Many of them are binary blobs (such as programs) which are inherently not printable. More details please! John W. Vinson [MVP] ...

Stuck in review and need to be in design.
I am using Visio 2007. I need to complete the diagram that I have been working on and I hit the review key by mistake. How do I get back to the design screen? On Wed, 4 Nov 2009 16:14:01 -0800, cameron <cameron@discussions.microsoft.com> wrote: >I am using Visio 2007. I need to complete the diagram that I have been >working on and I hit the review key by mistake. How do I get back to the >design screen? menu Tools -> Track Markup and then close the Review window. -- Regards, Paul Herber, Sandrila Ltd. DFD/SSADM for Visio http://www.visio-dfd.sa...

Need Help Despertly!
I am in a desperate situation. I had to reformat my hard drive. Prior to do this, I copied my entire User Profile to another drive. I can now access my User Profile information from Windows Explorer. Now that I installed Microsoft Outlook, I do not see any of my Contacts. I need to restore my Contacts to the new Outlook installation. Again, I did save my entire "User Profile" from my previous installation of Windows 2000 Professional. I just do not know how to access my Contact information from Outlook that included addresses and phone numbers and such. Any help would be greatly appr...

Plug in needed
Looking for an Outlook plug in which, on reply to a e-mail, will:- a) allow selective quoting only, and b) not top quote. Anything around at all? Much to my horror (sorry guys) the Boss wants us to use Outofluck at work! -- On the carpool lane lane to Nirvana. John Phillips <flatulentdingo@deadspam.com> wrote: > Looking for an Outlook plug in which, on reply to a e-mail, will:- > > a) allow selective quoting only, and > > b) not top quote. > > Anything around at all? The best Outlook adjunct I've found for quote handling on replies is Outlook-Quotef...

What is the Need for XSD in Application Blocks designing
Can anyone help in clearing my doubt Hi, There is a need for me to implement Application Blocks in my project, (Basically 3 tire), the project comprises of UIL, BLL,Business Entities, DAL.. When i saw the example programs from User Interface Application Block example, which is implementing the Business Layer part, Interface for BLL and Business Entity part where by i am not able to understand the real usage of XSD's and the autogenerated C#? Can anyone explain me what is the process flow behind this fuda in a simple terms. Thanks in Advance Jagadeesh ...

Need to Hire Outlook 2003 Help
Hi I'd like to hire someone that can walk me through some specific stuff with outlook 2003 I'm using the Lotus Notes to Outlook plugin My compnay is a Notes shop - which means I get NO support for outlook --- this plugin is a god send and i want to make sure I get it set up correctly It's coming out of my pocket but I'm willing to pay if I can find the right person to help me Please post ideas here or email me Thanks Brendan ...

Need Help with Excel and Flagging Outcomes!
I’m using Excel 2007, and here is my question… I want to put a formula in cell C3 that looks at outcomes in cell B3. If the raw score outcome in cell B3 has the following values, I would like cell C3 to provide the following words: IF: THEN: B3=Blank C3=Blank B3= Greater than 0-1.9 C3=Definitely False B3=2.0-2.9 C3=Mostly False B3=3.0-3.9 C3=Don’t Know B3=4.0-4.9 C3=Mostly True B3= 5.0 or greater C3=Definitely True Thank you for your help! Hi This should do it: =IF(B3=0,"",IF(B3<2,"Definet...

Which setting do I need to adjust
I've noticed that when using my default browser IE 8 and I click on a link that is suppose to start a download, it doesn't. When I click on the same link in firefox the download starts like it should. Can anyone tell me what setting in IE 8 is preventing the download from starting? on the page it says "Downloading: 50fpct-Just4freeplanet.com.rar | 34.7 MB" but in IE 8 it isn't downloading. It also isn't asking me if I want to allow IE 8 to download the file like it sometimes does. Thanks Shep wrote: > I've noticed that when using my d...

I really need help. Need a formula. Need it yesterday.
I'm new to Excel formulas, and I need one that is well beyond me at this stage, but probably a piece of cake for an Excel Wizard. I have a modest staffing schedule on Excel that shows several teams of employees with staffing requirements that may change every thirty minutes, as does the number of employees available in each team. I have the spreadsheet linked to another that provides the total, overall staffing requirement for each half hour, so that the total staffing requirement for each half-hour automatically loads to my staffing schedule. Likewise with the total number of emp...

need help! very urgently needed
i am using an Activex control in a dialog based applicaton(VC++). created an member variable for that(myportcontroller). In a non-stati function i am able to call the Activex control methods using the membe variable and worked fine. But i need to call the activex control method in an static function. Here i cannot use the member variable as it is static function. So, i declared an object for Activex control class Using that object i called the methods. I had no compile time error But i am getting run time assertion error as "winocc.cpp line:345". Ca anybody help? I need very urgen...

need to get my mail
how can i get my hot mail from here You can't, this is a newsgroup, it has nothing to do with email. -- -- "carlos" <bartlett_1974@hotmail.com> wrote in message news:O$yffBZiKHA.1540@TK2MSFTNGP06.phx.gbl... > how can i get my hot mail from here Windows Mail doesn't support HTTP mail, which for a long time was the=20 only allowed access method for free Hotmail accounts. Earlier this year Microsoft enabled POP access for free Hotmail/Live/MSN accounts. Follow the settings given here: http://mailcall.spaces.live.com/Blog/cns!CC9301187A51FE33!4...

Need Help Creating Directory
I am creating a membership directory for our church. When I try to do two columns it sets it up going left to right instead of down one column then the other. How do I get this done. I'm not sure how you managed that. Any chance you'd send it over to me and let me look at that? -- JoAnn Paules MVP Microsoft [Publisher] "Steve Cook" <SteveCook@discussions.microsoft.com> wrote in message news:C7DAB8B4-680E-4D46-A614-BB2FEC4ED35C@microsoft.com... >I am creating a membership directory for our church. When I try to do two > columns it sets it up going left t...

Need Char Comparer Help
Greetings, I'm writing some text-parsing code. I need to compare individual System.Char variables but need the option of ignoring case in the comparison. I need help in two areas. First, does anyone know a good way to compare characters ignoring case? I found a case insensitive comparer at http://stackoverflow.com/questions/1394877/what-is-the-correct-way-to-compare-char-ignoring-case/1394909 but I'm not sure that's the best approach. Basically, he converts both characters to upper case (with every comparison). But I don't know if this is reliable and it was...