|
<quote>
norm wrote:
It's using SQL server based security. what about NT based login?
How do you mean ? Once two machines are online and able to see each other, no login is necessarily required between them. Therefore the database has it's own security also, so it can validate users itself.
<end quote="">
there's two type of account that u can create with SQL server:
1. SQL server account (user name + passwd combination: transmitted in plain text over the wire)
2. NT based authentication (SQL grant access to a user based on the session/NT login: better security)
and with option 2: NT based authetication, u dont need to send passwd as Open argument. But format? how exactly do u call Open method with NT based login?
norm
|
|
|
|
|
Ah - that I don't know. I'd guess you don't need to specify anything, it will use the username and password you logged into your NT account with. That's how NT->win98 works, NT asks W98 for the username and password logged in.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
thanks anyway, i got a lot done with yr help in the last two days.
anyway, i read it before. u do it with Open method ... but i just cant remember exactly how...
but i think one video presentation from MSDN about SQL server security has this... in a powerpoint presentation that comes with the presentation...
i think the presentation is about SSL and SQL server... will check on that and get back to u if i can find it.
norm
|
|
|
|
|
found the presntation, it's:
Using Encryption with Microsoft SQL Server 2000
Kevin McDonnell Technical Lead SQL Server Support Microsoft Corporation
However, it just tells u that...:
Requires MDAC 2.6 or later to be installed
Does not require SQL Server 2000 Tools
Programmers can request SSL encryption in their connection string
ODBC : Encrypt = Yes
Oledb : Use Encryption for Data = True
The focus is on setting up the webserver certificate so that your SQL server and client can encrypt the traffic... but there's got to be a way to connect to a database using NT based login... i will check MSDN now.
anyway, if u want the file, send me an email or something. it's like...450kB
norm
|
|
|
|
|
"INF: Authentication Methods for Connections to SQL Server in Active Server Pages"
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q247931&
i am guessing: just leave out user and password in yr connection string. i need to do a few tests to confirm this
norm
|
|
|
|
|
can i programatically generate a GUID to use as the "name" of "named shared memory" created by call to CreateFileMapping(..) ??
code fragment would be welcome.
and if I want to create "no-name" file mapping, how can I communicate the handle to the file mapping object to a separate process? WM_COPYDATE??
thanks
norm
|
|
|
|
|
norm wrote:
can i programatically generate a GUID to use as the "name" of "named shared memory" created by call to CreateFileMapping(..) ??
CoCreateGuid() will do it
norm wrote:
and if I want to create "no-name" file mapping, how can I communicate the handle to the file mapping object to a separate process? WM_COPYDATE??
Yes, this means you have to use some other IPC channel to send the HANDLE to the target process. WM_COPYDATA is one idea, if the first process creates the second one, you could also use handle inheritance.
However, a named object is usually the most convinient solution.
BTW: I recommend to use not only a GUID for the name, but also a "human readable" part (somthing like My_app_shared_data_63dcc4b9-b122-4337-b897-88f6a7f49f3f ). This would make it much easier for you and others to find your section in tools like Process Explorer and other debugging tools.
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
thanks for the feedback first of all, but i dont understand the whole issue about handle inheritance. u can set the some flags in security attribute when u create the handle and when u CreateProcess. but the child process still have no idea what the handle is!? the child process has the right to inherit, but it still doesnt know what to inherit until the parent process send the handle via mechanism such as WM_COPYDATA??
norm
|
|
|
|
|
The usual (and most easy) way to pass the inherited handles to a child process is via the command line or environment variables.
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
I define this below data in .c file
<br />
CString m_data;<br />
when I compile there are these error message
<br />
error C2065: 'CString' : undeclared identifier<br />
error C2146: syntax error : missing ';' before identifier 'm_data'<br />
error C2065: 'm_data' : undeclared identifier<br />
Do you know how to solve my problem?
Thank you.
|
|
|
|
|
CString can only be used in C++ programs. If you can afford it, change the extension of your file to .cpp .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I created my first ATL COM inprocess server, and successfully invoked methods in a VB client. But when i try to integrate it into my ASP script, I got the following error when pointing the URL at my ASP page:
Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid ProgID. For additional information specific to this message please visit the Microsoft Online Support site located at: http://www.microsoft.com/contentredirect.asp.
/GenJoin.asp, line 7
My ASP script looks like this:
<% @Language = "VBScript" RUNAT=Server %>
<title>GenSQLJoin
Sub Session_OnStart()
Set SQLJoinEngine = Server.CreateObject("ATLFIRSTPROJLib.MyATLServ") THIS LINE IS CAUSING PROBLEM: Invalid ProgID
...
... other stuff...
...
QUESTION 1: how can i determine the progID for my ATL COM server? To help out:
1. my ATL project name: ATLFIRSTPROJ
2. Class: CMyATLServ
3. Interface: IMyATLServ
As mentioned, I already successfully invoked the server from a VB client:
Private Sub btnAdd_Click()
Dim objTestATL As ATLFIRSTPROJLib.MyATLServ
QUESTION 2:
(a) I dont understand the syntax here. We have class name = CMyATLServ and interface name = IMyATLServ. BUT nothing = MyATLServ
(b) My project name is ATLFIRSTPROJ. What's the "LIB" at the end of "ATLFIRSTPROJLib"?
Set objTestATL = New ATLWhore
Dim lngReturnValue As Long
objTestATL.SomeMethod Me.txtNum1, Me.txtNum2, lngReturnValue
Me.txtNum3.Text = lngReturnValue
End Sub
Thanks!
norm
|
|
|
|
|
The ProgID can be determined both by looking at the registry or looking in your .RGS file
You're probably having a bug in VC 6.0 without any service pack. It had a bug when creating an ATL COM component and the default ProgID of your project probably is ATLFIRSTPROJLib.MyATLServ.1
Apply the Service Pack 5 of Visual C++ to solve this and other bugs.
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
why did u say "You're probably having a bug in VC 6.0 without any service pack."
anyway, i am checking up on what u just advised now... will get back later.
thanks again.
norm
|
|
|
|
|
hey man, i think i just got it working =)
i looked at the rgs file and get the progID. thanks for the advice.
norm
|
|
|
|
|
Just wondering what u meant when u recommended SP5. i am having installation problem (on SP5) and not sure if i should download the service pack coz it doesnt say anything about bug fix on ASP/ATL-COM. Here's the link.
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q280367&
anyway, i thought i got it last nite. I think i successfully CreateObject.
but i am getting the following error now:
Error Type:
Server object, ASP 0177 (0x80004002)
No such interface supported
/AddNumber_action.asp, line 16
can u elaborate a little more on rgs file? and also, there's nothing in the regisrty that says "progID"... just a bunch of GUIDs.
Thanks
norm
|
|
|
|
|
I'm not sure in which specific Service Pack it was fixed, I recommended the SP5 because it's the latest one and carry all the fixes the previous SP had.
But, as I've said, it will fix THE WIZARD, so, only new projects will be affected by it.
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
Hi.
I was wondering if anybody can tell me how to get the mouse cords while it it over an owner drawn button..
I'm getting the WM_MOUSEMOVE while its over the main dialog, but as it goes over any button it dosn't get the message.
what I am trying to do is make a simple bitmap font editor, and I was thinking of using a button to draw the grid for editing the graphic.
I'm not using MFC (its all H handles (HWND, HBRUSH etc..)
many thanks.
Chris
|
|
|
|
|
I haven't used it, but I need to do something similar, take a look at this article that talks about TRACKMOUSEEVENT.
http://www.codeproject.com/buttonctrl/hoverbutton.asp
I don't know if the sample is right or not, but trackmouseevent could be your starting point to solve your problem.
hope this helps...
|
|
|
|
|
Thanks for the link, but it only gives you events when the mouse enters or leaves the button...
I want to be able to get the mouse cords in relation to a window..
its either that or can somebody give me an idea of a control to use to render the grid.. owner draw buttons work really well for that as you can draw everything yourself.. the static frame, rectangle even if you get the DC for the object don't change if you draw drectly to the DC..
Cheers
Chris
|
|
|
|
|
I know this is the wrong thread, but I only got a response on ATL in the other thread....
Are there any special requirements/dlls/etc. that your users computers need if you implement ATL / WTL / STL ? New to this area.
I am thinking of trying it out, and pointers would help. Thanks
"Best file compression around: DEL *.* = 100% compression."
<><><><><><><><><><><><><>
Matthew R. Miller
mattrmiller@computersmarts.net
www.computersmarts.net
|
|
|
|
|
ATL: Not if you use the MinDependency build target, which is recommended due to hassles with atl.dll (there are two builds, one for 9x one for NT, and there are backward-compatibility issues).
WTL: WTL itself needs no DLLs, however it is an extension to ATL.
STL: Uses the CRT, so you can either link the CRT in statically (again, the recommended way) or redistribute the CRT DLLs (ugh!)
--Mike--
"alyson hannigan is so cute it's crazy" -- Googlism
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
never used WTL.
for STL, you really don't need anything else.
for ATL, you might need something, depending on what your app does: if you do database stuff, you might need MDAC, etc.. but, in general no, you don't need anything unless you build "Min Size" builds, then you have to ship with a (very small) ATL dll.
-c
“losinger is a colorizing text edit control”
-- googlism
|
|
|
|
|
If I have these below data (base 256)
<br />
data[0] = 154;
data[1] = 203;
data[2] = 15;
data[3] = 54;
data[4] = 248;
data[5] = 175;
and I want to change data(base 256) to Ctring which have format in base 16 character
<br />
CString m_data;<br />
m_data = "9ACB0F38F8AF";<br />
Do you know how to do that?
Thank you for your answer.
|
|
|
|
|
You can do something like this, assuming data is some kind of integer type:
<br />
CString m_data;<br />
m_data.Format(_T("%X%X%X%X%X%X"), data[0], data[1], data[2], data[3],data[4],data[5]);<br />
- Anatari
|
|
|
|