| TOP SECRET MY MOM NEVER TOLD ME!! |
|
 |
Index ‹ Visual Studio ‹ VB Scripts
|
- Previous
- 1
- MFC >> Please help...:(this error message comes up whe i try to include my header file with mfc
fatal error C1853: 'Debug/tryhello.pch' is not a precompiled header file created with this compile
hello.
-----------
#if defined(__cplusplus
extern "C"
#endi
void Hello()
#if defined(__cplusplus
#endi
what i'm trying do do here is to integrate a .c file into an mfc environment. my expected output is when i click a button a console window would appear that would print HELLO WORLD.
this is the .c file that i am trying to use
hello.
---------------------
#include <stdio.h
#include <stdlib.h
#include <conio.h
#include "hello.h
void Hello(
char c
printf("HELLO WORLD!!!")
c = getch()
what do i need to do to get this to work. my dialog contains a single button and i inserted the function call (Hello( );) on the BN_CLICKED part of the code
please help..:
- 2
- VB Scripts >> Scirpt to disable a windows serviceHi...How can I stop and disable a windows service using vbscript?
Here's what I have to stop it but how do I disable it???...
Set WshShell=WScript.CreateObject("WScript.Shell")
ServiceName = """Alerter"""
Result = WshShell.Run("net stop " & ServiceName, 0, True)
- 3
- Visual Basic [VB] >> Adding the rebooting code to the setup project !Hi EveryBody:
Is there any way to add the rebooting code to the user interface of the setup project in VB.net ? if the answer is yes,how can I do it ?
but if the answer is no, Is there any way to add dialog that I made by myself which consist of the rebooting code to the user inteface of the setup project ? if the answer is yes, how can I do it ?
But if the answer is now, Is there any way to let my setup project rebooting after the installation is done?
any help will be appreciated.
al-ahmadi
- 4
- MFC >> Bitmap Not DisplayedA bitmap that appears in the MFC dialog editor does not display when the
application runs. The property settings and ID are the same in the VS 2003
version and the VS 6 version. The VS 6 version works fine.
It appears the update from VC++ 6 to VC++ 2003 has changed the mapping to
the runtime bitmap file, but why does the bitmap picture appear (as it
should) in the dialog editor, but not in the running version? The bitmap is
labeled as a "system" bitmap, but this is a custom developed bitmap (lots of
colors).
Any clues to why the bitmap will not display and how to fix it?
Thanks!
--
Dave Boyd
- 5
- Visual Basic [VB] >> connecting remore access 97 databaseHi
I am trying to connect remote access 97 database form ASP.NET page from vb.net using this connection string
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\ServerName\cdrive\Dt\ct\ct.mdb;
I get this erro
"The Microsoft Jet database engine cannot open the file '\\ServerName\cdrive\Dt\ct\ct.mdb' It is already opened exclusively by another user, or you need permission to view its data
If I use with null pwd
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\ServerName\cdrive\Dt\ct\ct.mdb;PWD=
I get this error "Could not find installable ISAM.
Some one please help
Thank
ashra
- 6
- Visual Basic [VB] >> invalid cast prob with oleDBdataReader...
Dim rdr As OleDbDataReader = cmd.ExecuteReader
If rdr.GetString(1).ToString.Length > 0 Then
Console.WriteLine(rdr.GetString(1).ToString)
End If
The field is in an MS Access table that rdr is reading and
is a text field. I am getting an invalid cast error when
the field is null/empty.
I have tried If Not IsDBNull(rdr.GetString(1).ToString)...
still same problem. How can I trap if the field is null?
Thanks
- 7
- Visual Studio C++ >> new invokes VirtualAllocHello everyone,
On Windows, when we allocate large amount of memory, new will call
VirtualAlloc directly, other than call HeapAlloc then through HeapAlloc call
VirtualAlloc indirectly?
Anyone to clarify this?
thanks in advance,
George
- 8
- Visual Basic >> Location of const variableHi,
Does the compiled code really run faster (at runtime) when having
constants variable in the form/class/module that they are used or I can
place all of them in a module used only for constant declaration?
Thanks a lot!
Marty
- 9
- MFC >> BROWSEINFO --> How to Show only Show only Hard Disk Driveshi..
I need to browse only Hard drives (if there r C & D, only C drive and D
drive) in my dialog. I dont Know the details. If you now the details
please mail
me.And another thing is upon opening the drive it should display only
the Folders , and should not display Files
- Navin
- 10
- Visual Basic >> Record Source TroubleThe sql of my forms record source has "Order by date" after the string but
this doesn't do any thing to the order of the records.
Why would this be the case?
- 11
- Mcse >> system timeoutsI have been trying to do some of the win server 2003
assesment exams and they keep hanging in the middle of the
assesments with unable to display page error. Anyone else
hving this problem? I have tried from two different
locations but about 30% of the time it works and 70% of
the time it fails
- 12
- MFC >> Setting font for StaticText ControlHello,
I'd like to set the size, fontname and color for one of my StaticText
controls on my dialog on a Visual Studio 2005 C++ MFC native project.
I've found out this control has a SetFont method(), which I presume enable
to set the styles as I've mentioned above, but I've got a little confused
about the parameters.
Is the SetFont() method the right/best way for setting the font for the
StaticText control?
If so, how I could set this font from my dialog class?
Do I have to set a member variable for the class for this purpose?
Where is the best place to set the font? The MyDlg::OnInitDialog() ?
Jeová
- 13
- 14
- Mcse >> MCSE 2003 Expiration?Well, Microsoft has released bunch of new track like MCPD and etc.
But it seems that nothing equivalent of new MCSE has come up.
So how long do you think new MCSE will come up? Will it be after the relase
of Vista? Or should I just persue MCSE.
- 15
- Visual Basic [VB] >> How to handle nulls in a construcorHi, Im real new at this so be gentle. I want to create a customer
object based on the results of an sql query to the customers table, ie
one object per row, and then add each of these objects to an arraylist
and then on to some datbinding in a listbox. Therefore, for each row
sent back by the datareader, I try to create the new customer object
and pass all the data in the row as part of the constructor. But, I
declared the data fields in the customer class to be the same data type
as those in the database but null causes a problem. To get round the
problem, I just made addtional New constuctors for each column which
may have nulls and then set the datfields to empty strings inside the
constructor and thus not pass the null data at all from the datreader
row. But that is a lot of kludge to test for null before the call to
the constructor so that i call the right constructor. i tried to have
constructors which accepts nulls as arguments and then set the private
data fields to empty strings from there but ran in to cast problems
*(esp with strict ON) in the call to the constructor.
What is the right way to create objects whose private data fields are
of one data type , but whose arguments might be null when they are
instantiated and how should null arguments be specified.
|
| Author |
Message |
Marchellpurple

|
VB Scripts >> TOP SECRET MY MOM NEVER TOLD ME!!
Discovers the "Secret of making huge money" in just few weeks....
You shall be amazed that how easy 1 can make money on internet just for doing 1 time work..[I GUREENTED U CAN TOO MAKE BIG$$ WITH THIS PROGRAM]........
[Use IE if can't view the site]
http://mysiteinc.com/gohar/index.html
Visual Studio272
|
| |
|
| |
 |
| |
 |
Index ‹ Visual Studio ‹ VB Scripts |
- Next
- 1
- Mcse >> ATTN: ConsultantConsultant, I suggest you take a look at
http://www.microsoft.com/communities/conduct/default.mspx
and acquaint yourself with the Chat code of conduct,
especially rule 1:
"Please treat all other online participants with respect
and do not use Microsoft Community Chats to threaten,
harass, stalk, or abuse other users."
Brain Boon
- 2
- Mcse >> The Practice Test Package Development: A New Service on the Certification Market01/19/2005 - Visual CertExam Software has launched the practice test
package development service to making it easier and less expensive for
companies to create practice tests.
The practice test package development service will provide you with a
universal solution for easy development and distribution of your own
practice exams.
The practice test package is a standalone setup program (setup.exe)
that contains a question bank and the application for taking tests.
These packages are very similar to Transcender and Self Test Software
practice tests.
Using this service sets you free from having to develop your own
software and thus makes the process of development your own practice
exams simpler and less expensive.
A practice test package includes the following features:
- The question bank and the application for taking test are
distributed as a single setup.exe file. This means that your users
don't need to buy and install any additional software in order to take
your tests.
- If you are a small company and have no an opportunity to develop
your own test engine, you can obtain the professional solution for
practice test delivery for a low cost.
- You can freely update a question bank in order to keep your test
actual.
- Each practice test package has a build-in activation mechanism.
For more information, see http://www.visualcertexam.com/service.html
- 3
- Visual Basic [VB] >> MarshalingGuys, please help. I am trying to make this work from at least 4 months.
I am new to programming and some things are difficult to me, but I really
need to make my project work.
I can't find anything helpfull in internet for 4 months ;-( .
Please someone who is more expirenced help me.
I am trying to use the Terminal Server APIs
There is as an API function WTSEnumerateSessions, which returns a
WTS_SESSION_INFO custom structure n times.
Actually it returns pointer to it.
I just can't get it working in VB .NET
While searching through MSDN I've found something, but I need an opinion
from someone more experienced.
The text is:
======
Formatted Non-Blittable Classes
Formatted non-blittable classes have fixed layout (formatted) but the data
representation is different in managed and unmanaged memory. The data can
require transformation under the following conditions:
If a non-blittable class is marshaled by value, the callee receives a
pointer to a copy of the data structure.
If a non-blittable class is marshaled by reference, the callee receives
a pointer to a pointer to a copy of the data structure.
If the InAttribute attribute is set, this copy is always initialized
with the instance's state, marshaling as necessary.
If the OutAttribute attribute is set, the state is always copied back to
the instance on return, marshaling as necessary.
If both InAttribute and OutAttribute are set, both copies are required.
If either attribute is omitted, the marshaler can optimize by eliminating
either copy.
Found at:
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconconsumingunmanageddllfunctions.asp)
======
According to this the date returned from WTSEnumerateSessions function is a
pointer to a pointer a copy of the data structure.
Or I am wrong?
If I am right, how to get this second pointer from VB .NET?
Here are the API Function and structure, by definition and how I've defined
them in my app
API
=====
WTS_SESSION_INFO
The WTS_SESSION_INFO structure contains information about a client session
on a terminal server.
typedef struct _WTS_SESSION_INFO { DWORD SessionId; LPTSTR
pWinStationName; WTS_CONNECTSTATE_CLASS State;
} WTS_SESSION_INFO, *PWTS_SESSION_INFO;
WTSEnumerateSessions
The WTSEnumerateSessions function retrieves a list of sessions on a
specified terminal server.
BOOL WTSEnumerateSessions(
HANDLE hServer,
DWORD Reserved,
DWORD Version,
PWTS_SESSION_INFO* ppSessionInfo,
DWORD* pCount
);
=====
And in my code
====
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto)> _
Private Structure WTS_SESSION_INFO
Dim SessionID As Int32 'DWORD integer
Dim pWinStationName As String ' integer LPTSTR - Pointer to a
null-terminated string containing the name of the WinStation for this
session
Dim State As WTS_CONNECTSTATE_CLASS
End Structure
<DllImport("wtsapi32.dll", _
bestfitmapping:=True, _
CallingConvention:=CallingConvention.StdCall, _
CharSet:=CharSet.Auto, _
EntryPoint:="WTSEnumerateSessions", _
SetLastError:=True, _
ThrowOnUnmappableChar:=True)> _
Private Shared Function WTSEnumerateSessions2( _
ByVal hServer As IntPtr, _
<MarshalAs(UnmanagedType.U4)> _
ByVal Reserved As Int32, _
<MarshalAs(UnmanagedType.U4)> _
ByVal Vesrion As Int32, _
ByRef ppSessionInfo As IntPtr, _
<MarshalAs(UnmanagedType.U4)> _
ByRef pCount As Int32) As Int32
End Function
TIA
- 4
- MFC >> LVS_OWNERDATA and NM_CUSTOMDRAW with CListCtrl == slow?Forgive me if this is a near duplicate post... anyway, I'm trying to use
NM_CUSTOMDRAW to draw all the items manually in a virtual CListCtrl (a list
control with LVS_OWNERDATA). The problem is that my method is very slow and
sluggish feeling compared to the way windows does it, and I don't know why.
Keeping in mind that NM_CUSTOMDRAW is only fired once per item, due to the
LVS_OWERDATA style, rather than once per sub item, perhaps someone can
explain to me what I'm doing wrong? Heres the code:
void CMusikPlaylistCtrl::OnLvnGetdispinfo(NMHDR *pNMHDR, LRESULT *pResult)
{
NMLVDISPINFO *pDispInfo = reinterpret_cast<NMLVDISPINFO*>(pNMHDR);
// NM_CUSTOMDRAW will take care of drawing
*pResult = 0;
}
void CMusikPlaylistCtrl::OnNMCustomdraw(NMHDR *pNMHDR, LRESULT *pResult)
{
NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>( pNMHDR );
*pResult = CDRF_DODEFAULT;
if ( CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage )
*pResult = CDRF_NOTIFYITEMDRAW;
else if ( CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage )
{
int iRow = (int)pLVCD->nmcd.dwItemSpec;
CDC* pDC = CDC::FromHandle(pLVCD->nmcd.hdc);
CRect item_rect;
GetItemRect( iRow, &item_rect, LVIR_BOUNDS );
DrawItem( pDC, iRow, item_rect ); // draw item [see below]
*pResult = CDRF_SKIPDEFAULT;
}
else if( pLVCD->nmcd.dwDrawStage == CDDS_ITEMPOSTPAINT )
*pResult = CDRF_DODEFAULT;
}
void CMusikPlaylistCtrl::DrawItem( CDC* pDC, int item, const CRect& rect )
{
CMemDC dc( pDC, &rect );
// setup the font and highlight colors
COLORREF bg = GetSysColor( COLOR_BTNHILIGHT );
COLORREF text = GetSysColor( COLOR_WINDOWTEXT );
// color each sub item
CRect rcSubItem;
dc.SetTextColor( text );
for ( size_t i = 0; i < m_Prefs->GetPlaylistColCount(); i++ )
{
GetSubItemRect( item, i, LVIR_BOUNDS, rcSubItem );
dc.FillSolidRect( &rcSubItem, bg );
dc.TextOut( rcSubItem.left + 6, rcSubItem.top, _T( "Test" ) );
}
}
Any suggestions or advice as to how to speed this up would be much
appreciated. Thanks!
Casey
- 5
- VB Scripts >> How to use ADO.NET in vbs file called from command line?I'm trying to run some ADO.NET code in a vbs file that is called from the
command line as follows:
C:\CScript MyFile.vbs
but I get a compilation error, expected end of statement. The sample code
below is where I'm trying to just open/close a connection..What do I have to
do to use the .NET framework?
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Dim sqlConnection As SqlConnection = New SqlConnection()
sqlConnection.ConnectionString =
"SERVER=dbserver;DATABASE=mydb;UID=username;PWD=password"
sqlConnection.Open()
sqlConnection.Close()
- 6
- 7
- MFC >> SocketHow can I connect to smtp server?
I tried to use CSocket:
CSocket csk;
csk.Create();
csk.Connect("server.com", 25);
but there is an error during connecting to server.com (function Connect
return false)....
Thx for help me
ArtuS
- 8
- MFC >> Text file IOI have a class that inputs data from a text file. The files can be very
large, and I'd like to display a progress bar to the user. Of course, to
determine this I need to know the total number of lines in the file. What's
the most efficient (i.e. fastest) way to get it? Right now I use brute
force: I read through the entire file, counting the lines but not processing
the data (code below). Then I reset the ifstream to prepare for reading the
data. Is there a better way?
Thanks,
Chip
// Construct ifstrem object for file input
ifstream File(Filename, ios::nocreate);
********
// Count total lines in file
streampos StartPos = File.tellg(); // Get file start position
FileLines = 0;
while(!File.eof())
{
File.ignore(1000, '\n'); // Get/ignore line
FileLines++;
}
// Prepare File for reading/processing
File.seekg(StartPos); // Return istream ptr to start position
File.clear(); // Reset eof bit
TRACE("File has %i lines\n", FileLines);
******
// Read data...
- 9
- VB Scripts >> vbscript for ADAMI am a sys admin for a small/medium size company and would like to
investigate utilizing vbscript to automate tasks on an ADAM install.
Ex. How to create an OU object via vbscript, user object etc...
- 10
- MFC >> mfc class wizard pops up everytime!hi,
i just started with vc7 with an MFC dialog box project. I added
some controls and attached variables... it worked out fine. I
don't know what happened but now every control I doubleclick
pops up the MFC Class Wizard. Right-clicking any control does
not show the ADD VARIABLE option anymore. The ClassView
does not show TestMFCDlg as a class anymore (the AboutDlg
class is there and I can add variables to it as well!)
Can somebody please tell me what went wrong?
IDE version: 7.0.9466
Thank you.
dtor
- 11
- Visual Basic >> Err.DescriptionLooking through some old code I see the statement MsgBox Error$
If this any different to MsgBox Err.Description
Thanks,
Chris
- 12
- Visual Basic [VB] >> Strange Error - WebClient DownloadDataHello,
I am trying to download web data into my current application. Failing
many attempts I tried to run the sample from the MS Help files with no
luck. If I create a new solution and put the sample code on a button
then it works. However, when do the same on a new form in my existing
solution then I get following error. Could there be some global
settings in my application that are causing problems?
Thanks in advance,
-Dave
Error:
-----------------------------------------------
An unhandled exception of type 'System.Net.WebException' occurred in
system.dll
Additional information: An exception occurred during a WebClient
request.
Sample Code:
-----------------------------------------------
Dim remoteUrl As String = "http://www.msn.com"
' Create a new WebClient instance.
Dim myWebClient As New System.Net.WebClient
' Download the home page data.
Console.WriteLine(("Downloading " + remoteUrl))
' Downloads the Web resource and saves it into a data buffer.
' !!!!!!!!!! THIS LINE CAUSES THE ERROR !!!!!!!!!!!!!!!
Dim myDatabuffer As Byte() = myWebClient.DownloadData(remoteUrl)
' Display the downloaded data.
Dim download As String =
System.Text.Encoding.ASCII.GetString(myDatabuffer)
Console.WriteLine(download)
Console.WriteLine("Download successful.")
- 13
- MFC >> Screen captures of windows other than one belonging to app.Is there an easy way to perform a screen capture of a window that does
not belong to the application doing the screenshot? I know you can
capture the entire screen, but I would like to capture selected windows.
I'm guessing that it's possible if the capturing app can get hold of the
DC of the target window, but I'm not sure how you do that. Paint
programs seem to be able to do this so I guess it's possible.
(BTW: I'm using VC6 with DirectX 8.0 SDK installed.)
- 14
- MFC >> how passwords should be stored under windowsHi, I have a project which needs me to store passwords
under windows, I just wondering how those passwords should
be stored. For example, if I store in the registry, is
there any encription tool I can use so that only my
program can read and write it?
- 15
- Visual Basic >> IIS permissionsSorry if this is the wrong newsgroup for this but I don't know a better one
and I figure a lot of people in this one might have some experience in this.
Basically I am trying to create a simple ASP application that will
instantiate excel, export a chart to a gif, and then write an img src tag
with the name of that gif. I've tried it as a Visual Basic IIS application
and a normal ASP application using Visual Interdev. With the Visual Basic
IIS application, it works fine in debug mode. But deploying it is the real
nightmare. I've tried creating a virtual directory from within IIS and
setting the permissions to include Write, and copying the resulting .ASP
file that VB creates to that directory. I get Application defined or object
defined error - Excel couldn't save the file. In fact it won't even do
anything that involves writing to a file.
I get a similar sort of error when trying to do it from Visual Interdev.
I can't see what I'm doing wrong - can anyone point me in the right
direction?
I've tried using the P&D wizard to publish it to the server but it gave me a
'no post info file found on server' message. I'm running XP pro
(workstation).
|
|
|